home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-10-09 | 96.8 KB | 3,133 lines |
- *** 1.6 1992/08/14 15:10:24
- --- PatchLev.h 1992/10/09 20:08:47
- ***************
- *** 1,4 ****
- ! #define PatchLevel "3"
-
- /*
- * the Patch Level above is to identify the version
- --- 1,4 ----
- ! #define PatchLevel "4"
-
- /*
- * the Patch Level above is to identify the version
- *** 1.2 1992/06/11 23:40:40
- --- c-convert.c 1992/10/09 20:08:57
- ***************
- *** 232,242 ****
- {
- /* Don't do unsigned arithmetic where signed was wanted,
- or vice versa.
- ! Exception: if either of the original operands were
- unsigned then can safely do the work as unsigned.
- And we may need to do it as unsigned
- if we truncate to the original size. */
- ! typex = ((TREE_UNSIGNED (TREE_TYPE (expr))
- || TREE_UNSIGNED (TREE_TYPE (arg0))
- || TREE_UNSIGNED (TREE_TYPE (arg1)))
- ? unsigned_type (typex) : signed_type (typex));
- --- 232,247 ----
- {
- /* Don't do unsigned arithmetic where signed was wanted,
- or vice versa.
- ! Exception 1: if we will eventually truncate
- ! the result to unsigned, then do the work as unsigned;
- ! this can prevent unnecessary sign-extension.
- ! Exception 2: if either of the original operands were
- unsigned then can safely do the work as unsigned.
- And we may need to do it as unsigned
- if we truncate to the original size. */
- ! typex = (((outprec <= TYPE_PRECISION (typex)
- ! && TREE_UNSIGNED (type))
- ! || TREE_UNSIGNED (TREE_TYPE (expr))
- || TREE_UNSIGNED (TREE_TYPE (arg0))
- || TREE_UNSIGNED (TREE_TYPE (arg1)))
- ? unsigned_type (typex) : signed_type (typex));
- ***************
- *** 284,290 ****
- {
- /* Don't do unsigned arithmetic where signed was wanted,
- or vice versa. */
- ! typex = (TREE_UNSIGNED (TREE_TYPE (expr))
- ? unsigned_type (typex) : signed_type (typex));
- return convert (type,
- build_unary_op (ex_form,
- --- 289,297 ----
- {
- /* Don't do unsigned arithmetic where signed was wanted,
- or vice versa. */
- ! typex = (((outprec <= TYPE_PRECISION (typex)
- ! && TREE_UNSIGNED (type))
- ! || TREE_UNSIGNED (TREE_TYPE (expr)))
- ? unsigned_type (typex) : signed_type (typex));
- return convert (type,
- build_unary_op (ex_form,
- ***************
- *** 327,333 ****
- {
- /* Don't do unsigned arithmetic where signed was wanted,
- or vice versa. */
- ! typex = (TREE_UNSIGNED (TREE_TYPE (expr))
- ? unsigned_type (typex) : signed_type (typex));
- return convert (type,
- fold (build (COND_EXPR, typex,
- --- 334,342 ----
- {
- /* Don't do unsigned arithmetic where signed was wanted,
- or vice versa. */
- ! typex = (((outprec <= TYPE_PRECISION (typex)
- ! && TREE_UNSIGNED (type))
- ! || TREE_UNSIGNED (TREE_TYPE (expr)))
- ? unsigned_type (typex) : signed_type (typex));
- return convert (type,
- fold (build (COND_EXPR, typex,
- *** 1.6 1992/06/12 05:28:49
- --- c-decl.c 1992/10/09 20:08:58
- ***************
- *** 298,303 ****
- --- 298,307 ----
- whose TREE_VALUE is its old definition (a kind of ..._DECL node). */
- tree shadowed;
-
- + /* For a memorable binding_level, a pointer to the BLOCK node associated
- + which this binding_level at the time it was originally exited. */
- + tree associated_block;
- +
- /* For each level (except not the global one),
- a chain of BLOCK nodes for all the levels
- that were entered and exited one level down. */
- ***************
- *** 333,338 ****
- --- 337,346 ----
- not including any forward-decls in the parmlist.
- This is so we can put the parms in proper order for assign_parms. */
- tree parm_order;
- +
- + /* Nonzero if we should keep this binding_level record around
- + even after it looks like we no longer need it. */
- + unsigned memorable : 1;
- };
-
- #define NULL_BINDING_LEVEL (struct binding_level *) NULL
- ***************
- *** 852,862 ****
- or if this level is a function body,
- create a BLOCK to record them for the life of this function. */
-
- ! if (keep || functionbody
- || (current_binding_level->keep_if_subblocks && subblocks != 0))
- block = build_block (keep ? decls : 0, keep ? tags : 0,
- subblocks, 0, 0);
-
- /* In each subblock, record that this is its superior. */
-
- for (link = subblocks; link; link = TREE_CHAIN (link))
- --- 860,872 ----
- or if this level is a function body,
- create a BLOCK to record them for the life of this function. */
-
- ! if (keep || functionbody || current_binding_level->memorable
- || (current_binding_level->keep_if_subblocks && subblocks != 0))
- block = build_block (keep ? decls : 0, keep ? tags : 0,
- subblocks, 0, 0);
-
- + current_binding_level->associated_block = block;
- +
- /* In each subblock, record that this is its superior. */
-
- for (link = subblocks; link; link = TREE_CHAIN (link))
- ***************
- *** 926,939 ****
- }
- }
-
- ! /* Pop the current level, and free the structure for reuse. */
-
- {
- register struct binding_level *level = current_binding_level;
- current_binding_level = current_binding_level->level_chain;
-
- ! level->level_chain = free_binding_level;
- ! free_binding_level = level;
- }
-
- /* Dispose of the block that we just made inside some higher level. */
- --- 936,953 ----
- }
- }
-
- ! /* Pop the current level, and free the structure for reuse unless it is
- ! marked as being "memorable". */
-
- {
- register struct binding_level *level = current_binding_level;
- current_binding_level = current_binding_level->level_chain;
-
- ! if (!level->memorable)
- ! {
- ! level->level_chain = free_binding_level;
- ! free_binding_level = level;
- ! }
- }
-
- /* Dispose of the block that we just made inside some higher level. */
- ***************
- *** 976,981 ****
- --- 990,1045 ----
- if (block)
- TREE_USED (block) = 1;
- return block;
- + }
- +
- + /* Mark the current binding level as "memorable" and return a pointer to it.
- + The pointer returned can be used to restore this context later (if that
- + proves to be necessary). Also mark the rest of the binding_levels in
- + the currently active binding_level chain as "memorable" so that they
- + wont disappear on us when they are later deactivated (upon exit from
- + the scopes which they represent). */
- +
- + struct binding_level *
- + current_memorable_context ()
- + {
- + register struct binding_level *level;
- +
- + for (level = current_binding_level; level; level = level->level_chain)
- + level->memorable = 1;
- +
- + return current_binding_level;
- + }
- +
- + /* Given a pointer to an old (memorable) binding_level record which was
- + previously created, activated, and then deactivated, activate the
- + binding_level again (temporarily) so that we can generate some more
- + code (e.g. for a goto_fixup) and make it look like it was generated
- + in the given binding_level during the time when that binding_level
- + was first active. */
- +
- + void
- + push_old_context (context)
- + register struct binding_level *context;
- + {
- + context->level_chain = current_binding_level;
- + current_binding_level = context;
- + }
- +
- + /* Assuming that the most recently activated binding_level was an old
- + (memorable) binding_level which was temporarily reactivated, deactivate
- + it again. Also, take note of any new subblocks which have been generated
- + during the time this old binding_level has been reactivated. */
- +
- + void
- + pop_old_context ()
- + {
- + /* New subblocks may have been added, so remember again what the list of
- + subblocks for this block is. */
- +
- + BLOCK_SUBBLOCKS (current_binding_level->associated_block)
- + = current_binding_level->blocks;
- +
- + current_binding_level = current_binding_level->level_chain;
- }
-
- void
- *** 1.3 1992/06/11 23:40:40
- --- c-parse.y 1992/10/09 20:09:00
- ***************
- *** 329,335 ****
- { $$ = $3;
- pedantic = $<itype>1; }
- | unop cast_expr %prec UNARY
- ! { $$ = build_unary_op ($1, $2, 0); }
- /* Refer to the address of a label as a pointer. */
- | ANDAND identifier
- { tree label = lookup_label ($2);
- --- 329,336 ----
- { $$ = $3;
- pedantic = $<itype>1; }
- | unop cast_expr %prec UNARY
- ! { $$ = build_unary_op ($1, $2, 0);
- ! constant_expression_warning ($$, 0); }
- /* Refer to the address of a label as a pointer. */
- | ANDAND identifier
- { tree label = lookup_label ($2);
- *** 1.2 1992/03/27 21:49:26
- --- c-tree.h 1992/10/09 20:09:00
- ***************
- *** 107,112 ****
- --- 107,113 ----
- extern tree digest_init ();
- extern tree c_expand_start_case ();
- extern tree default_conversion ();
- + extern void constant_expression_warning ();
-
- /* Given two integer or real types, return the type for their sum.
- Given two compatible ANSI C types, returns the merged type. */
- *** 1.4 1992/06/11 23:40:40
- --- c-typeck.c 1992/10/09 20:09:01
- ***************
- *** 784,797 ****
- }
-
- /* Print a warning if a constant expression had overflow in folding.
- ! This doesn't really work--it is waiting for changes in fold. */
-
- void
- ! constant_expression_warning (value)
- tree value;
- {
- ! if (TREE_CODE (value) == NON_LVALUE_EXPR && TREE_CONSTANT_OVERFLOW (value))
- ! pedwarn ("overflow in constant expression");
- }
-
- /* Implement the __alignof keyword: Return the minimum required
- --- 784,805 ----
- }
-
- /* Print a warning if a constant expression had overflow in folding.
- ! If EVEN_IF_UNSIGNED is nonzero, warn even if the expression is unsigned. */
-
- void
- ! constant_expression_warning (value, even_if_unsigned)
- tree value;
- + int even_if_unsigned;
- {
- ! if (TREE_CODE (value) == INTEGER_CST
- ! && TREE_CONSTANT_OVERFLOW (value)
- ! && (! TREE_UNSIGNED (TREE_TYPE (value)) || even_if_unsigned))
- ! {
- ! TREE_CONSTANT_OVERFLOW (value) = 0;
- ! pedwarn (TREE_UNSIGNED (TREE_TYPE (value))
- ! ? "constant expression out of range for unsigned type"
- ! : "signed integer overflow in constant expression");
- ! }
- }
-
- /* Implement the __alignof keyword: Return the minimum required
- ***************
- *** 2128,2133 ****
- --- 2136,2143 ----
- }
- }
-
- + constant_expression_warning (result, 0);
- +
- class = TREE_CODE_CLASS (TREE_CODE (result));
-
- /* Record the code that was specified in the source,
- ***************
- *** 3719,3724 ****
- --- 3729,3735 ----
- warning ("cast to pointer from integer of different size");
-
- value = convert (type, value);
- + constant_expression_warning (value, 0);
- }
-
- if (value == expr && pedantic)
- ***************
- *** 3937,3943 ****
- &&
- (coder == INTEGER_TYPE || coder == REAL_TYPE || coder == ENUMERAL_TYPE))
- {
- ! return convert (type, rhs);
- }
- /* Conversions among pointers */
- else if (codel == POINTER_TYPE && coder == POINTER_TYPE)
- --- 3948,3956 ----
- &&
- (coder == INTEGER_TYPE || coder == REAL_TYPE || coder == ENUMERAL_TYPE))
- {
- ! tree t = convert (type, rhs);
- ! constant_expression_warning (t, 1);
- ! return t;
- }
- /* Conversions among pointers */
- else if (codel == POINTER_TYPE && coder == POINTER_TYPE)
- ***************
- *** 4224,4230 ****
- #endif
-
- /* ANSI wants warnings about out-of-range constant initializers. */
- ! constant_expression_warning (value);
-
- DECL_INITIAL (decl) = value;
- }
- --- 4237,4243 ----
- #endif
-
- /* ANSI wants warnings about out-of-range constant initializers. */
- ! constant_expression_warning (value, 1);
-
- DECL_INITIAL (decl) = value;
- }
- *** 1.9 1992/07/07 14:31:13
- --- cccp.c 1992/10/09 20:09:03
- ***************
- *** 1545,1555 ****
- }
- if (e1) {
- if (db_hack) {
- ! #ifdef atarist
- ! strcat (epath, ",");
- ! #else
- ! strcat (epath, ":");
- ! #endif
- }
- strcat (epath, e1);
- db_hack = 1;
- --- 1545,1551 ----
- }
- if (e1) {
- if (db_hack) {
- ! strcat (epath, PATH_SEP_STR);
- }
- strcat (epath, e1);
- db_hack = 1;
- ***************
- *** 1556,1571 ****
- }
- if (e2) {
- if (db_hack) {
- ! #ifdef atarist
- ! strcat (epath, ",");
- ! #else
- ! strcat (epath, ":");
- ! #endif
- }
- strcat (epath, e2);
- }
- }
-
- #else
- switch ((objc << 1) + cplusplus)
- {
- --- 1552,1569 ----
- }
- if (e2) {
- if (db_hack) {
- ! strcat (epath, PATH_SEP_STR);
- }
- strcat (epath, e2);
- }
- }
-
- + #ifdef atarist
- + if (epath)
- + for (e3=epath; *e3; e3++) /* Use one kind of path separator */
- + if (*e3 == ';')
- + *e3 = PATH_SEPARATOR;
- + #endif
- #else
- switch ((objc << 1) + cplusplus)
- {
- ***************
- *** 1592,1602 ****
- char *startp, *endp;
-
- for (num_dirs = 1, startp = epath; *startp; startp++)
- - #ifdef atarist
- - if ((*startp == ';') || (*startp == ','))
- - #else
- if (*startp == PATH_SEPARATOR)
- - #endif
- num_dirs++;
- include_defaults
- = (struct default_include *) xmalloc ((num_dirs
- --- 1590,1596 ----
- ***************
- *** 1606,1612 ****
- num_dirs = 0;
- while (1) {
- /* Handle cases like c:/usr/lib:d:/gcc/lib */
- - #ifndef atarist
- if ((*endp == PATH_SEPARATOR
- #if 0 /* Obsolete, now that we use semicolons as the path separator. */
- #ifdef __MSDOS__
- --- 1600,1605 ----
- ***************
- *** 1615,1623 ****
- #endif
- )
- || *endp == 0) {
- - #else
- - if ((*endp == ';') || (*endp == ',') || (*endp == '\0')) {
- - #endif
- strncpy (nstore, startp, endp-startp);
- if (endp == startp)
- strcpy (nstore, ".");
- --- 1608,1613 ----
- ***************
- *** 1644,1654 ****
- tack on the standard include file dirs to the specified list */
- if (!no_standard_includes) {
- struct default_include *p = include_defaults;
- - #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
- - char *specd_prefix = NULL;
- - #else
- char *specd_prefix = include_prefix;
- - #endif
- #ifdef GCC_INCLUDE_DIR
- char *default_prefix = savestring (GCC_INCLUDE_DIR);
- #else
- --- 1634,1640 ----
- *** 1.3 1992/06/11 23:40:40
- --- combine.c 1992/10/09 20:09:05
- ***************
- *** 4987,4993 ****
- {
- varop = plus_constant (XEXP (varop, 0),
- INTVAL (XEXP (varop, 1)) & constop);
- ! constop = ~0;
- break;
- }
-
- --- 4987,4993 ----
- {
- varop = plus_constant (XEXP (varop, 0),
- INTVAL (XEXP (varop, 1)) & constop);
- ! constop = (unsigned) ~0;
- break;
- }
-
- *** 1.4 1992/06/11 23:40:40
- --- cp-class.c 1992/10/09 20:09:07
- ***************
- *** 2520,2526 ****
-
- if (! fields) fields = x;
- DECL_FIELD_CONTEXT (x) = t;
- ! DECL_CLASS_CONTEXT (x) = t;
- DECL_FIELD_SIZE (x) = 0;
-
- /* We set DECL_BIT_FIELD tentatively in grokbitfield.
- --- 2520,2528 ----
-
- if (! fields) fields = x;
- DECL_FIELD_CONTEXT (x) = t;
- ! /* We could be making an extern "C" function a friend. */
- ! if (DECL_LANG_SPECIFIC (x))
- ! DECL_CLASS_CONTEXT (x) = t;
- DECL_FIELD_SIZE (x) = 0;
-
- /* We set DECL_BIT_FIELD tentatively in grokbitfield.
- *** 1.4 1992/06/11 23:40:40
- --- cp-cvt.c 1992/10/09 20:09:08
- ***************
- *** 831,842 ****
- {
- /* Don't do unsigned arithmetic where signed was wanted,
- or vice versa.
- ! Exception: if the original operands were unsigned
- ! then can safely do the work as unsigned.
- And we may need to do it as unsigned
- if we truncate to the original size. */
- ! typex = ((TREE_UNSIGNED (TREE_TYPE (expr))
- ! || TREE_UNSIGNED (TREE_TYPE (arg0)))
- ? unsigned_type (typex) : signed_type (typex));
- return convert (type,
- build_binary_op_nodefault (ex_form,
- --- 831,848 ----
- {
- /* Don't do unsigned arithmetic where signed was wanted,
- or vice versa.
- ! Exception 1: if we will eventually truncate
- ! the result, then do the work as unsigned;
- ! this can prevent unnecessary sign-extension.
- ! Exception 2: if either of the original operands were
- ! unsigned then can safely do the work as unsigned.
- And we may need to do it as unsigned
- if we truncate to the original size. */
- ! typex = (((outprec <= TYPE_PRECISION (typex)
- ! && TREE_UNSIGNED (type))
- ! || TREE_UNSIGNED (TREE_TYPE (expr))
- ! || TREE_UNSIGNED (TREE_TYPE (arg0))
- ! || TREE_UNSIGNED (TREE_TYPE (arg1)))
- ? unsigned_type (typex) : signed_type (typex));
- return convert (type,
- build_binary_op_nodefault (ex_form,
- ***************
- *** 883,889 ****
- {
- /* Don't do unsigned arithmetic where signed was wanted,
- or vice versa. */
- ! typex = (TREE_UNSIGNED (TREE_TYPE (expr))
- ? unsigned_type (typex) : signed_type (typex));
- return convert (type,
- build_unary_op (ex_form,
- --- 889,897 ----
- {
- /* Don't do unsigned arithmetic where signed was wanted,
- or vice versa. */
- ! typex = (((outprec <= TYPE_PRECISION (typex)
- ! && TREE_UNSIGNED (type))
- ! || TREE_UNSIGNED (TREE_TYPE (expr)))
- ? unsigned_type (typex) : signed_type (typex));
- return convert (type,
- build_unary_op (ex_form,
- ***************
- *** 926,932 ****
- {
- /* Don't do unsigned arithmetic where signed was wanted,
- or vice versa. */
- ! typex = (TREE_UNSIGNED (TREE_TYPE (expr))
- ? unsigned_type (typex) : signed_type (typex));
- return convert (type,
- fold (build (COND_EXPR, typex,
- --- 934,942 ----
- {
- /* Don't do unsigned arithmetic where signed was wanted,
- or vice versa. */
- ! typex = (((outprec <= TYPE_PRECISION (typex)
- ! && TREE_UNSIGNED (type))
- ! || TREE_UNSIGNED (TREE_TYPE (expr)))
- ? unsigned_type (typex) : signed_type (typex));
- return convert (type,
- fold (build (COND_EXPR, typex,
- *** 1.3 1992/06/11 23:40:40
- --- cp-decl.c 1992/10/09 20:09:09
- ***************
- *** 535,540 ****
- --- 535,544 ----
- /* Same, for IDENTIFIER_TYPE_VALUE. */
- tree type_shadowed;
-
- + /* For a memorable binding_level, a pointer to the BLOCK node associated
- + which this binding_level at the time it was originally exited. */
- + tree associated_block;
- +
- /* For each level (except not the global one),
- a chain of BLOCK nodes for all the levels
- that were entered and exited one level down. */
- ***************
- *** 573,578 ****
- --- 577,586 ----
- this scope. This happens in some template definitions. */
- unsigned accept_any : 1;
-
- + /* Nonzero if we should keep this binding_level record around
- + even after it looks like we no longer need it. */
- + unsigned memorable : 1;
- +
- /* Three bits left for this word. */
-
- #if PARANOID
- ***************
- *** 698,713 ****
- /* Pop the current level, and free the structure for reuse. */
- {
- register struct binding_level *level = current_binding_level;
- current_binding_level = current_binding_level->level_chain;
- ! level->level_chain = free_binding_level;
- #ifdef DEBUG_CP_BINDING_LEVELS
- ! memset (level, 0x69, sizeof (*level));
- #else
- ! free_binding_level = level;
- #if PARANOID
- ! level->depth = ~0; /* ~0 assumes that the depth is unsigned. */
- #endif
- #endif
- if (current_binding_level->parm_flag == 2)
- {
- class_binding_level = current_binding_level;
- --- 706,736 ----
- /* Pop the current level, and free the structure for reuse. */
- {
- register struct binding_level *level = current_binding_level;
- +
- + /* Pop the stack of current "active" binding_level records. */
- +
- current_binding_level = current_binding_level->level_chain;
- !
- ! /* If the binding_level which we just made inactive is *not* a
- ! "memorable" binding_level, then throw it back onto the recycling
- ! pile of old binding_level records. Otherwise, just let it be.
- ! If it was marked as "memorable" then some goto_fixup saved a
- ! a pointer to it, and the binding_level record will be used later
- ! on to restore the same lexical context again (temporarily). */
- !
- ! if (!level->memorable)
- ! {
- ! level->level_chain = free_binding_level;
- #ifdef DEBUG_CP_BINDING_LEVELS
- ! memset (level, 0x69, sizeof (*level));
- #else
- ! free_binding_level = level;
- #if PARANOID
- ! level->depth = ~0; /* ~0 assumes that the depth is unsigned. */
- #endif
- #endif
- + }
- +
- if (current_binding_level->parm_flag == 2)
- {
- class_binding_level = current_binding_level;
- ***************
- *** 740,747 ****
- int
- kept_level_p ()
- {
- ! return (current_binding_level->keep
- ! || current_binding_level->names != 0);
- }
-
- /* Identify this binding level as a level of parameters. */
- --- 763,773 ----
- int
- kept_level_p ()
- {
- ! return (current_binding_level->blocks != 0
- ! || current_binding_level->keep
- ! || current_binding_level->names != 0
- ! || (current_binding_level->tags != 0
- ! && !current_binding_level->tag_transparent));
- }
-
- /* Identify this binding level as a level of parameters. */
- ***************
- *** 950,959 ****
- or if this level is a function body,
- create a BLOCK to record them for the life of this function. */
-
- ! if (keep == 1 || functionbody > 0)
- block = build_block (keep ? decls : 0, keep ? tags : 0,
- subblocks, 0, 0);
-
- /* In each subblock, record that this is its superior. */
-
- if (keep >= 0)
- --- 976,987 ----
- or if this level is a function body,
- create a BLOCK to record them for the life of this function. */
-
- ! if (keep == 1 || functionbody > 0 || current_binding_level->memorable)
- block = build_block (keep ? decls : 0, keep ? tags : 0,
- subblocks, 0, 0);
-
- + current_binding_level->associated_block = block;
- +
- /* In each subblock, record that this is its superior. */
-
- if (keep >= 0)
- ***************
- *** 1080,1085 ****
- --- 1108,1163 ----
- #endif
- return block;
- }
- +
- + /* Mark the current binding level as "memorable" and return a pointer to it.
- + The pointer returned can be used to restore this context later (if that
- + proves to be necessary). Also mark the rest of the binding_levels in
- + the currently active binding_level chain as "memorable" so that they
- + wont disappear on us when they are later deactivated (upon exit from
- + the scopes which they represent). */
- +
- + struct binding_level *
- + current_memorable_context ()
- + {
- + register struct binding_level *level;
- +
- + for (level = current_binding_level; level; level = level->level_chain)
- + level->memorable = 1;
- +
- + return current_binding_level;
- + }
- +
- + /* Given a pointer to an old (memorable) binding_level record which was
- + previously created, activated, and then deactivated, activate the
- + binding_level again (temporarily) so that we can generate some more
- + code (e.g. for a goto_fixup) and make it look like it was generated
- + in the given binding_level during the time when that binding_level
- + was first active. */
- +
- + void
- + push_old_context (context)
- + register struct binding_level *context;
- + {
- + context->level_chain = current_binding_level;
- + current_binding_level = context;
- + }
- +
- + /* Assuming that the most recently activated binding_level was an old
- + (memorable) binding_level which was temporarily reactivated, deactivate
- + it again. Also, take note of any new subblocks which have been generated
- + during the time this old binding_level has been reactivated. */
- +
- + void
- + pop_old_context ()
- + {
- + /* New subblocks may have been added, so remember again what the list of
- + subblocks for this block is. */
- +
- + BLOCK_SUBBLOCKS (current_binding_level->associated_block)
- + = current_binding_level->blocks;
- +
- + current_binding_level = current_binding_level->level_chain;
- + }
-
- /* Add BLOCK to the current list of blocks for this binding contour. */
- void
- ***************
- *** 6215,6221 ****
- int funcdef_flag = 0;
- enum tree_code innermost_code = ERROR_MARK;
- int bitfield = 0;
- ! int variable_size = 0;
- /* Set this to error_mark_node for FIELD_DECLs we could not handle properly.
- All FIELD_DECLs we build here have `init' put into their DECL_INITIAL. */
- tree init = 0;
- --- 6293,6299 ----
- int funcdef_flag = 0;
- enum tree_code innermost_code = ERROR_MARK;
- int bitfield = 0;
- ! int size_varies = 0;
- /* Set this to error_mark_node for FIELD_DECLs we could not handle properly.
- All FIELD_DECLs we build here have `init' put into their DECL_INITIAL. */
- tree init = 0;
- ***************
- *** 7085,7090 ****
- --- 7163,7172 ----
- pedwarn ("ANSI C++ forbids variable-size array `%s'", name);
- dont_grok_size:
- itype = build_binary_op (MINUS_EXPR, size, integer_one_node);
- + /* Make sure the array size remains visibly nonconstant
- + even if it is (eg) a const variable with known value. */
- + size_varies = 1;
- + itype = variable_size (itype);
- itype = build_index_type (itype);
- }
- resume_momentary (yes);
- ***************
- *** 10110,10132 ****
- && TREE_CHAIN (DECL_ARGUMENTS (fndecl)) != NULL_TREE)
- build_default_constructor (fndecl);
-
- ! /* Emit insns from `emit_base_init' which sets up virtual
- ! function table pointer(s). */
- ! emit_insns (base_init_insns);
- ! base_init_insns = 0;
- !
- ! /* This is where the body of the constructor begins.
- ! If there were no insns in this function body, then the
- ! last_parm_insn is also the last insn.
- !
- ! If optimization is enabled, last_parm_insn may move, so
- ! we don't hold on to it (across emit_base_init). */
- ! last_parm_insn = (struct rtx_def *)get_first_nonparm_insn ();
- ! if (last_parm_insn == 0) last_parm_insn = mark;
- ! else last_parm_insn = (struct rtx_def *) previous_insn (last_parm_insn);
-
- ! if (mark != get_last_insn ())
- ! reorder_insns (next_insn (mark), get_last_insn (), last_parm_insn);
-
- /* This is where the body of the constructor ends. */
- expand_label (ctor_label);
- --- 10192,10218 ----
- && TREE_CHAIN (DECL_ARGUMENTS (fndecl)) != NULL_TREE)
- build_default_constructor (fndecl);
-
- ! /* Now attach the insns which do baseclass initializations (for a
- ! constructor) to the insn stream. */
- ! {
- ! register struct rtx_def *attach_point;
-
- ! /* This is where the body of the constructor begins.
- ! If there were no insns in this function body, then the
- ! attach_point is also the last insn. */
- !
- ! attach_point = (struct rtx_def *)get_first_nonparm_insn ();
- ! if (attach_point == 0)
- ! attach_point = mark;
- !
- ! attach_point
- ! = (struct rtx_def *) get_first_following_block_beg (attach_point);
- !
- ! /* Emit insns from `emit_base_init' which sets up virtual
- ! function table pointer(s). */
- ! emit_insns_after (base_init_insns, attach_point);
- ! base_init_insns = 0;
- ! }
-
- /* This is where the body of the constructor ends. */
- expand_label (ctor_label);
- *** 1.3 1992/06/11 23:40:40
- --- cp-init.c 1992/10/09 20:09:13
- ***************
- *** 258,264 ****
- /* Virtual base classes are special cases. Their initializers
- are recorded with this constructor, and they are used when
- this constructor is the top-level constructor called. */
- ! if (! TREE_VIA_VIRTUAL (binfo) || pedantic)
- {
- /* Otherwise, if it is not an immediate base class, complain. */
- for (i = n_baseclasses-1; i >= 0; i--)
- --- 258,264 ----
- /* Virtual base classes are special cases. Their initializers
- are recorded with this constructor, and they are used when
- this constructor is the top-level constructor called. */
- ! if (! TREE_VIA_VIRTUAL (binfo))
- {
- /* Otherwise, if it is not an immediate base class, complain. */
- for (i = n_baseclasses-1; i >= 0; i--)
- *** 1.3 1992/06/11 23:40:40
- --- cp-tree.h 1992/10/09 20:09:19
- ***************
- *** 1405,1411 ****
-
- #define JOINER '$'
-
- ! #define THIS_NAME "$t"
- #define VPTR_NAME "$v"
- #define THROW_NAME "$eh_throw"
- #define DESTRUCTOR_DECL_PREFIX "_$_"
- --- 1405,1411 ----
-
- #define JOINER '$'
-
- ! #define THIS_NAME "this"
- #define VPTR_NAME "$v"
- #define THROW_NAME "$eh_throw"
- #define DESTRUCTOR_DECL_PREFIX "_$_"
- ***************
- *** 1432,1438 ****
-
- #define JOINER '.'
-
- ! #define THIS_NAME ".t"
- #define VPTR_NAME ".v"
- #define THROW_NAME ".eh_throw"
- #define DESTRUCTOR_DECL_PREFIX "_._"
- --- 1432,1438 ----
-
- #define JOINER '.'
-
- ! #define THIS_NAME "this"
- #define VPTR_NAME ".v"
- #define THROW_NAME ".eh_throw"
- #define DESTRUCTOR_DECL_PREFIX "_._"
- *** 1.8 1992/07/21 15:34:14
- --- dbxout.c 1992/10/09 20:09:23
- ***************
- *** 142,150 ****
- #if defined (USG) || defined (NO_STAB_H)
- #include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */
- #else
- - #if defined(CROSSATARI) || defined(atarist) || defined(atariminix)
- - #include "astab.h"
- - #else
- #include <stab.h> /* On BSD, use the system's stab.h. */
-
- /* This is a GNU extension we need to reference in this file. */
- --- 142,147 ----
- ***************
- *** 152,158 ****
- #define N_CATCH 0x54
- #endif
- #endif /* not USG */
- - #endif
-
- #ifdef __GNU_STAB__
- #define STAB_CODE_TYPE enum __stab_debug_code
- --- 149,154 ----
- ***************
- *** 408,421 ****
- #ifdef DBX_OUTPUT_MAIN_SOURCE_DIRECTORY
- DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (asmfile, cwd);
- #else /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
- - #ifndef atarist
- fprintf (asmfile, "%s \"%s/\",%d,0,0,%s\n", ASM_STABS_OP,
- cwd, N_SO, <ext_label_name[1]);
- - #else
- - fprintf (asmfile, "%s \"", ASM_STABS_OP);
- - atari_output_filename(asmfile, cwd);
- - fprintf (asmfile, "\\\\\",%d,0,0,%s\n", N_SO, <ext_label_name[1]);
- - #endif
- #endif /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
- }
- }
- --- 404,411 ----
- ***************
- *** 428,441 ****
- /* We include outputting `Ltext:' here,
- because that gives you a way to override it. */
- /* Used to put `Ltext:' before the reference, but that loses on sun 4. */
- - #ifndef atarist
- fprintf (asmfile, "%s \"%s\",%d,0,0,%s\n", ASM_STABS_OP, input_file_name,
- N_SO, <ext_label_name[1]);
- - #else
- - fprintf (asmfile, "%s \"", ASM_STABS_OP);
- - atari_output_filename(asmfile, input_file_name);
- - fprintf(asmfile, "\",%d,0,0,%s\n", N_SO, <ext_label_name[1]);
- - #endif
- text_section ();
- ASM_OUTPUT_INTERNAL_LABEL (asmfile, "Ltext", 0);
- #endif /* no DBX_OUTPUT_MAIN_SOURCE_FILENAME */
- --- 418,425 ----
- ***************
- *** 501,514 ****
- DBX_OUTPUT_SOURCE_FILENAME (file, filename);
- #else
- ASM_GENERATE_INTERNAL_LABEL (ltext_label_name, "Ltext", 0);
- - #ifndef atarist
- fprintf (file, "%s \"%s\",%d,0,0,%s\n", ASM_STABS_OP,
- filename, N_SOL, <ext_label_name[1]);
- - #else
- - fprintf (file, "%s \"", ASM_STABS_OP);
- - atari_output_filename(file, filename);
- - fprintf (file, "\",%d,0,0,%s\n", N_SOL, <ext_label_name[1]);
- - #endif
- #endif
- lastfile = filename;
- }
- --- 485,492 ----
- *** 1.3 1992/06/11 23:40:40
- --- dwarfout.c 1992/10/09 20:09:28
- ***************
- *** 26,31 ****
- --- 26,32 ----
- #include <stdio.h>
- #include "dwarf.h"
- #include "tree.h"
- + #include "cp-tree.h"
- #include "flags.h"
- #include "rtl.h"
- #include "insn-config.h"
- ***************
- *** 84,89 ****
- --- 85,109 ----
- #define ASM_COMMENT_START ";#"
- #endif
-
- + /* Given a pointer to some ..._DECL node, yield a pointer to the tree node
- + which represents the scope within which the given decl actually appeared.
- + This has to be messy (like it is) because in the special case of virtual
- + functions in derived classes which were also declared in a base class,
- + the g++ front end keeps the pointer to the *actual* scope of the decl
- + representing the virtual member function in DECL_CLASS_CONTEXT rather
- + than in DECL_CONTEXT (as it should). This macro can be disposed of
- + when the g++ front-end gets fixed to always put the proper value into
- + the DECL_CONTEXT field (even for virtual functions declared in derived
- + classes). */
- +
- + #define DECL_ACTUAL_CONTEXT(DECL) \
- + ((gplusplus_trees \
- + && DECL_LANG_SPECIFIC(DECL) != 0 \
- + && TREE_CODE (DECL) == FUNCTION_DECL \
- + && DECL_VIRTUAL_P (DECL)) \
- + ? DECL_CLASS_CONTEXT(DECL) \
- + : DECL_CONTEXT(DECL))
- +
- /* Define a macro which, when given a pointer to some BLOCK node, returns
- a pointer to the FUNCTION_DECL node from which the given BLOCK node
- was instantiated (as an inline expansion). This macro needs to be
- ***************
- *** 170,175 ****
- --- 190,199 ----
-
- typedef struct filename_entry filename_entry;
-
- + /* A flag which is non-zero if we being driven by the g++ front-end. */
- +
- + static int gplusplus_trees = 0;
- +
- /* Pointer to an array of elements, each one having the structure above. */
-
- static filename_entry *filename_table;
- ***************
- *** 750,755 ****
- --- 774,791 ----
- && (REGNO (XEXP (rtl, 0)) >= FIRST_PSEUDO_REGISTER)));
- }
-
- + inline int
- + is_class_type (arg)
- + register tree arg;
- + {
- + register enum tree_code code;
- +
- + if (!arg)
- + return 0;
- + code = TREE_CODE (arg);
- + return (code == RECORD_TYPE || code == UNION_TYPE);
- + }
- +
- static char *
- dwarf_tag_name (tag)
- register unsigned tag;
- ***************
- *** 1302,1309 ****
- Dwarf terminology we're dealing with here. */
-
- ASM_OUTPUT_DWARF_STACK_OP (asm_out_file, OP_BASEREG);
- ! ASM_OUTPUT_DWARF_DATA4 (asm_out_file,
- ! DBX_REGISTER_NUMBER (REGNO (rtl)));
- break;
-
- case MEM:
- --- 1338,1348 ----
- Dwarf terminology we're dealing with here. */
-
- ASM_OUTPUT_DWARF_STACK_OP (asm_out_file, OP_BASEREG);
- ! if (is_pseudo_reg (rtl))
- ! ASM_OUTPUT_DWARF_DATA4 (asm_out_file, (unsigned) -1);
- ! else
- ! ASM_OUTPUT_DWARF_DATA4 (asm_out_file,
- ! DBX_REGISTER_NUMBER (REGNO (rtl)));
- break;
-
- case MEM:
- ***************
- *** 1358,1365 ****
-
- case REG:
- ASM_OUTPUT_DWARF_STACK_OP (asm_out_file, OP_REG);
- ! ASM_OUTPUT_DWARF_DATA4 (asm_out_file,
- ! DBX_REGISTER_NUMBER (REGNO (rtl)));
- break;
-
- case MEM:
- --- 1397,1407 ----
-
- case REG:
- ASM_OUTPUT_DWARF_STACK_OP (asm_out_file, OP_REG);
- ! if (is_pseudo_reg (rtl))
- ! ASM_OUTPUT_DWARF_DATA4 (asm_out_file, (unsigned) -1);
- ! else
- ! ASM_OUTPUT_DWARF_DATA4 (asm_out_file,
- ! DBX_REGISTER_NUMBER (REGNO (rtl)));
- break;
-
- case MEM:
- ***************
- *** 2474,2496 ****
- /* Find the IDENTIFIER_NODE for the type name. */
- if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE)
- t = TYPE_NAME (type);
- ! #if 0
- /* The g++ front end makes the TYPE_NAME of *each* tagged type point
- to a TYPE_DECL node, regardless of whether or not a `typedef' was
- involved. This is distinctly different from what the gcc front-end
- does. It always makes the TYPE_NAME for each tagged type be either
- NULL (signifying an anonymous tagged type) or else a pointer to an
- ! IDENTIFIER_NODE. Obviously, we would like to generate correct Dwarf
- ! for both C and C++, but given this inconsistency in the TREE
- ! representation of tagged types for C and C++ in the GNU front-ends,
- ! we cannot support both languages correctly unless we introduce some
- ! front-end specific code here, and rms objects to that, so we can
- ! only generate correct Dwarf for one of these two languages. C is
- ! more important, so for now we'll do the right thing for C and let
- ! g++ go fish. */
-
- else
- ! if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL)
- t = DECL_NAME (TYPE_NAME (type));
- #endif
- /* Now get the name as a string, or invent one. */
- --- 2516,2534 ----
- /* Find the IDENTIFIER_NODE for the type name. */
- if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE)
- t = TYPE_NAME (type);
- ! #if 1
- /* The g++ front end makes the TYPE_NAME of *each* tagged type point
- to a TYPE_DECL node, regardless of whether or not a `typedef' was
- involved. This is distinctly different from what the gcc front-end
- does. It always makes the TYPE_NAME for each tagged type be either
- NULL (signifying an anonymous tagged type) or else a pointer to an
- ! IDENTIFIER_NODE. Obviously, we want to generate correct Dwarf
- ! for both C and C++, but doing so requires us to check which source
- ! language we are dealing with here. */
-
- else
- ! if (strcmp (language_string, "GNU C++") == 0
- ! && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL)
- t = DECL_NAME (TYPE_NAME (type));
- #endif
- /* Now get the name as a string, or invent one. */
- ***************
- *** 2667,2701 ****
- type_attribute (type, 0, 0);
- }
-
- - /* Output a DIE to represent a declared function (either file-scope
- - or block-local) which has "external linkage" (according to ANSI-C). */
- -
- - static void
- - output_global_subroutine_die (arg)
- - register void *arg;
- - {
- - register tree decl = arg;
- - register tree type = TREE_TYPE (decl);
- - register tree return_type = TREE_TYPE (type);
- -
- - ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_global_subroutine);
- - sibling_attribute ();
- - dienum_push ();
- - name_and_src_coords_attributes (decl);
- - inline_attribute (decl);
- - prototyped_attribute (type);
- - member_attribute (DECL_CONTEXT (decl));
- - type_attribute (return_type, 0, 0);
- - if (!TREE_EXTERNAL (decl))
- - {
- - char func_end_label[MAX_ARTIFICIAL_LABEL_BYTES];
- -
- - low_pc_attribute (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
- - sprintf (func_end_label, FUNC_END_LABEL_FMT, current_funcdef_number);
- - high_pc_attribute (func_end_label);
- - }
- - }
- -
- /* Output a DIE to represent a declared data object (either file-scope
- or block-local) which has "external linkage" (according to ANSI-C). */
-
- --- 2705,2710 ----
- ***************
- *** 2868,2880 ****
- member_attribute (DECL_CONTEXT (decl));
- type_attribute (member_declared_type (decl),
- TREE_READONLY (decl), TREE_THIS_VOLATILE (decl));
- ! if (DECL_BIT_FIELD_TYPE (decl)) /* If this is a bit field... */
- {
- ! byte_size_attribute (decl);
- ! bit_size_attribute (decl);
- ! bit_offset_attribute (decl);
- }
- - data_member_location_attribute (decl);
- }
-
- #if 0
- --- 2877,2905 ----
- member_attribute (DECL_CONTEXT (decl));
- type_attribute (member_declared_type (decl),
- TREE_READONLY (decl), TREE_THIS_VOLATILE (decl));
- !
- ! /* Handle C++ static data member declarations & definitions. Any FIELD_DECL
- ! node marked as EXTERNAL must represent the declaration of a C++ static
- ! data member (usually within its containing classtype definition). Any
- ! FIELD_DECL node marked as STATIC represents a definition of a C++ static
- ! data member (outside of its classtype definition). */
- !
- ! if (!TREE_EXTERNAL (decl))
- {
- ! if (TREE_STATIC (decl))
- ! location_attribute (decl); /* static data member definition */
- ! else
- ! {
- ! /* Come here for non-static data members. */
- ! if (DECL_BIT_FIELD_TYPE (decl)) /* If this is a bit field... */
- ! {
- ! byte_size_attribute (decl);
- ! bit_size_attribute (decl);
- ! bit_offset_attribute (decl);
- ! }
- ! data_member_location_attribute (decl);
- ! }
- }
- }
-
- #if 0
- ***************
- *** 3016,3026 ****
- }
- }
-
- ! /* Output a DIE to represent a declared function (either file-scope
- ! or block-local) which has "internal linkage" (according to ANSI-C). */
-
- static void
- ! output_local_subroutine_die (arg)
- register void *arg;
- {
- register tree decl = arg;
- --- 3041,3050 ----
- }
- }
-
- ! /* Output a DIE to represent a declared function. */
-
- static void
- ! output_subroutine_die (arg)
- register void *arg;
- {
- register tree decl = arg;
- ***************
- *** 3027,3034 ****
- register tree type = TREE_TYPE (decl);
- register tree return_type = TREE_TYPE (type);
- char func_end_label[MAX_ARTIFICIAL_LABEL_BYTES];
-
- - ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_subroutine);
- sibling_attribute ();
- dienum_push ();
- name_and_src_coords_attributes (decl);
- --- 3051,3069 ----
- register tree type = TREE_TYPE (decl);
- register tree return_type = TREE_TYPE (type);
- char func_end_label[MAX_ARTIFICIAL_LABEL_BYTES];
- + register tree context = DECL_CONTEXT (decl);
- + /* Note that the g++ front-end currently screws up and unsets the
- + TREE_PUBLIC flag on FUNCTION_DECL nodes representing member
- + function definitions which appear after their containing class
- + types. We conpensate for that screw-up here. */
- + register int external_linkage
- + = TREE_PUBLIC (decl) || DECL_EXTERNAL (decl) || is_class_type (context);
- +
- + ASM_OUTPUT_DWARF_TAG (asm_out_file,
- + external_linkage
- + ? TAG_global_subroutine
- + : TAG_subroutine);
-
- sibling_attribute ();
- dienum_push ();
- name_and_src_coords_attributes (decl);
- ***************
- *** 3040,3046 ****
- /* Avoid getting screwed up in cases where a function was declared static
- but where no definition was ever given for it. */
-
- ! if (TREE_ASM_WRITTEN (decl))
- {
- low_pc_attribute (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
- sprintf (func_end_label, FUNC_END_LABEL_FMT, current_funcdef_number);
- --- 3075,3081 ----
- /* Avoid getting screwed up in cases where a function was declared static
- but where no definition was ever given for it. */
-
- ! if (TREE_ASM_WRITTEN (decl) && !TREE_EXTERNAL (decl))
- {
- low_pc_attribute (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
- sprintf (func_end_label, FUNC_END_LABEL_FMT, current_funcdef_number);
- ***************
- *** 3730,3735 ****
- --- 3765,3772 ----
- register tree decl;
- register tree containing_scope;
- {
- + register int doing_member_of_current_class;
- +
- if (TREE_CODE (decl) == ERROR_MARK)
- return;
-
- ***************
- *** 3737,3747 ****
- But don't ignore a function definition, since that would screw
- up our count of blocks, and that it turn will completely screw up the
- the labels we will reference in subsequent AT_low_pc and AT_high_pc
- ! attributes (for subsequent blocks). */
- !
- ! if (DECL_IGNORED_P (decl) && TREE_CODE (decl) != FUNCTION_DECL)
- return;
-
- switch (TREE_CODE (decl))
- {
- case CONST_DECL:
- --- 3774,3800 ----
- But don't ignore a function definition, since that would screw
- up our count of blocks, and that it turn will completely screw up the
- the labels we will reference in subsequent AT_low_pc and AT_high_pc
- ! attributes (for subsequent blocks). Also, don't ignore TYPE_DECLs
- ! which are marked as "ignorable". Those come from the g++ front end
- ! and we really must not totally ignore them. */
- !
- ! if (DECL_IGNORED_P (decl)
- ! && TREE_CODE (decl) != FUNCTION_DECL
- ! && TREE_CODE (decl) != TYPE_DECL)
- return;
-
- + /* Set a flag variable to say if the decl we are dealing with at the
- + moment happens to be a member of the classtype we are currently
- + generating DIEs for. (We have to do some special stuff when we
- + are generating DWARF to represent the declarations of member
- + functions of the current classtype and/or when we are generating
- + DWARF to represent the declarations of static member variables of
- + the current classtype. */
- +
- + doing_member_of_current_class
- + = is_class_type (containing_scope)
- + && containing_scope == DECL_ACTUAL_CONTEXT (decl);
- +
- switch (TREE_CODE (decl))
- {
- case CONST_DECL:
- ***************
- *** 3750,3766 ****
- break;
-
- case FUNCTION_DECL:
- ! /* If we are in terse mode, don't output any DIEs to represent
- ! mere external function declarations. Also, if we are conforming
- ! to the DWARF version 1 specification, don't output DIEs for
- ! mere external function declarations. */
- !
- ! if (TREE_EXTERNAL (decl))
- ! #if (DWARF_VERSION > 1)
- ! if (debug_info_level <= DINFO_LEVEL_TERSE)
- ! #endif
- ! break;
-
- /* Before we describe the FUNCTION_DECL itself, make sure that we
- have described its return type. */
-
- --- 3803,3820 ----
- break;
-
- case FUNCTION_DECL:
- ! /* If we are in terse mode or if we are conforming to the DWARF
- ! version 1 specification, don't output DIEs for mere external
- ! function declarations, unless of course the declarations in
- ! question are for C++ member functions and we are currently
- ! generating DIEs for the members of some classtype. */
-
- + if (TREE_EXTERNAL (decl) && !doing_member_of_current_class)
- + {
- + if (debug_info_level <= DINFO_LEVEL_TERSE)
- + break;
- + }
- +
- /* Before we describe the FUNCTION_DECL itself, make sure that we
- have described its return type. */
-
- ***************
- *** 3767,3778 ****
- output_type (TREE_TYPE (TREE_TYPE (decl)), containing_scope);
-
- /* If the following DIE will represent a function definition for a
- ! function with "extern" linkage, output a special "pubnames" DIE
- ! label just ahead of the actual DIE. A reference to this label
- ! was already generated in the .debug_pubnames section sub-entry
- ! for this function definition. */
-
- ! if (TREE_PUBLIC (decl))
- {
- char label[MAX_ARTIFICIAL_LABEL_BYTES];
-
- --- 3821,3833 ----
- output_type (TREE_TYPE (TREE_TYPE (decl)), containing_scope);
-
- /* If the following DIE will represent a function definition for a
- ! file-scope function definition which has "external linkage" (as
- ! that term is defined by the ANSI C standard) output a special
- ! "pubnames" DIE label just ahead of the actual DIE. A reference
- ! to this label was already generated in the .debug_pubnames
- ! section sub-entry for this function definition. */
-
- ! if (containing_scope == NULL_TREE && TREE_PUBLIC (decl))
- {
- char label[MAX_ARTIFICIAL_LABEL_BYTES];
-
- ***************
- *** 3780,3791 ****
- ASM_OUTPUT_LABEL (asm_out_file, label);
- }
-
- ! /* Now output a DIE to represent the function itself. */
-
- ! output_die (TREE_PUBLIC (decl) || TREE_EXTERNAL (decl)
- ! ? output_global_subroutine_die
- ! : output_local_subroutine_die,
- ! decl);
-
- /* Now output descriptions of the arguments for this function.
- This gets (unnecessarily?) complex because of the fact that
- --- 3835,3862 ----
- ASM_OUTPUT_LABEL (asm_out_file, label);
- }
-
- ! /* Now output a DIE to represent the function itself. Note that C++
- ! member functions *always* have external linkage, regardless of
- ! whether or not the g++ front end screws up the TREE_PUBLIC flag. */
-
- ! if (!doing_member_of_current_class)
- ! output_die (output_subroutine_die, decl);
- ! else
- ! {
- ! register int saved_external_flag = DECL_EXTERNAL (decl);
- !
- ! /* In the case where we are going to generate a DIE for a member
- ! function within the list of children of it's parent classtype,
- ! we need to fool the `output_subroutine_die' routine into
- ! avoiding the generation of AT_low_pc and AT_high_pc attributes
- ! within the DIE. We do that by temporarily marking the DECL
- ! node as "external" and then setting it back to the way it
- ! was before. */
- !
- ! TREE_EXTERNAL (decl) = 1; /* Fool `output_subroutine_die'. */
- ! output_die (output_subroutine_die, decl);
- ! TREE_EXTERNAL (decl) = saved_external_flag;
- ! }
-
- /* Now output descriptions of the arguments for this function.
- This gets (unnecessarily?) complex because of the fact that
- ***************
- *** 3796,3808 ****
- with the FUNCTION_DECL. This will be a node of type FUNCTION_TYPE.
- If the chain of type nodes hanging off of this FUNCTION_TYPE node
- ends with a void_type_node then there should *not* be an ellipsis
- ! at the end. */
-
- ! /* In the case where we are describing an external function, all
- we need to do here (and all we *can* do here) is to describe
- ! the *types* of its formal parameters. */
-
- ! if (TREE_EXTERNAL (decl))
- output_formal_types (TREE_TYPE (decl));
- else
- {
- --- 3867,3894 ----
- with the FUNCTION_DECL. This will be a node of type FUNCTION_TYPE.
- If the chain of type nodes hanging off of this FUNCTION_TYPE node
- ends with a void_type_node then there should *not* be an ellipsis
- ! at the end.
-
- ! In the case where we are describing an external function, all
- we need to do here (and all we *can* do here) is to describe
- ! the *types* of its formal parameters.
- !
- ! Also, in the case where we are generating info for a member function
- ! of some C++ classtype, and where we currently generating DIEs for
- ! entities declared within the containing classtype itself, we should
- ! not try to generate TAG_formal_parameter DIEs which contain either
- ! AT_name or AT_location attributes, because in these cases, we want
- ! to just act like the given member function was *declared* but not
- ! *defined* within the classtype definition. The actual definition of
- ! the given member function should always appear to exist separately,
- ! in the same scope where the containing classtype definition appears,
- ! and following the classtype definition. (Note that these "following"
- ! definitions of member functions may be created artifically by the
- ! compiler in some cases. See the "rewrite rule" in section 9.3.2/1
- ! of the ARM.)
- ! */
-
- ! if (TREE_EXTERNAL (decl) || doing_member_of_current_class)
- output_formal_types (TREE_TYPE (decl));
- else
- {
- ***************
- *** 3818,3824 ****
- being explicitly told. */
-
- if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE)
- ! arg_decls = TREE_CHAIN (arg_decls);
-
- {
- register tree last_arg;
- --- 3904,3910 ----
- being explicitly told. */
-
- if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE)
- ! arg_decls = arg_decls ? TREE_CHAIN (arg_decls) : NULL_TREE;
-
- {
- register tree last_arg;
- ***************
- *** 3934,3945 ****
- }
-
- /* Output Dwarf info for all of the stuff within the body of the
- ! function (if it has one - it may be just a declaration). */
-
- {
- register tree outer_scope = DECL_INITIAL (decl);
-
- ! if (outer_scope && TREE_CODE (outer_scope) != ERROR_MARK)
- {
- /* Note that here, `outer_scope' is a pointer to the outermost
- BLOCK node created to represent the body of a function.
- --- 4020,4045 ----
- }
-
- /* Output Dwarf info for all of the stuff within the body of the
- ! function (if it has one - it may be just a declaration). In
- ! the case where we are generating info for a member function of
- ! some C++ classtype, and where we currently generating DIEs for
- ! entities declared within the containing classtype itself, we
- ! must not generate any info for the body of the member function
- ! because that info will be generated when we are generating the
- ! DIEs for the function's *definition*, and that definition should
- ! always appear to exist separately, in the same scope where the
- ! containing classtype definition appears, and following the class-
- ! type definition. (Note that these "following" definitions of
- ! member functions may be created artifically by the compiler in
- ! some cases. See the "rewrite rule" in section 9.3.2/1 of the ARM.)
- ! */
-
- {
- register tree outer_scope = DECL_INITIAL (decl);
-
- ! if (outer_scope
- ! && TREE_CODE (outer_scope) != ERROR_MARK
- ! && !doing_member_of_current_class)
- {
- /* Note that here, `outer_scope' is a pointer to the outermost
- BLOCK node created to represent the body of a function.
- ***************
- *** 4000,4012 ****
- /* Note that unlike the gcc front end (which generates a NULL named
- TYPE_DECL node for each complete tagged type, each array type,
- and each function type node created) the g++ front end generates
- ! a *named* TYPE_DECL node for each tagged type node created.
- ! Unfortunately, these g++ TYPE_DECL nodes cause us to output many
- ! superfluous and unnecessary TAG_typedef DIEs here. When g++ is
- ! fixed to stop generating these superfluous named TYPE_DECL nodes,
- ! the superfluous TAG_typedef DIEs will likewise cease. */
- !
- ! if (DECL_NAME (decl))
- /* Output a DIE to represent the typedef itself. */
- output_die (output_typedef_die, decl);
- break;
- --- 4100,4114 ----
- /* Note that unlike the gcc front end (which generates a NULL named
- TYPE_DECL node for each complete tagged type, each array type,
- and each function type node created) the g++ front end generates
- ! a *named* TYPE_DECL node for each tagged type node created. We
- ! must filter out these g++ TYPE_DECL nodes or else they will cause
- ! us to output many superfluous and unnecessary TAG_typedef DIEs.
- ! We filter out these evil g++ TYPE_DECL nodes here. */
- !
- ! if (DECL_NAME (decl)
- ! && (strcmp (language_string, "GNU C++") != 0
- ! || (IDENTIFIER_POINTER (DECL_NAME (decl))[0] != ' '
- ! && TYPE_NAME (TREE_TYPE (decl)) != decl)))
- /* Output a DIE to represent the typedef itself. */
- output_die (output_typedef_die, decl);
- break;
- ***************
- *** 4017,4022 ****
- --- 4119,4152 ----
- break;
-
- case VAR_DECL:
- + /* The g++ front end represents static data members of classtypes as
- + VAR_DECL nodes rather than as FIELD_DECL nodes. Don't ask me why.
- + Anyway, we handle them here. */
- +
- + if (is_class_type (DECL_CONTEXT (decl)))
- + {
- + output_type (TREE_TYPE (decl), containing_scope);
- + if (!doing_member_of_current_class)
- + output_die (output_member_die, decl);
- + else
- + {
- + register int saved_external_flag = DECL_EXTERNAL (decl);
- +
- + /* In the case where we are going to generate a DIE for a C++
- + static data member within the list of children of it's
- + parent classtype, we need to fool the `output_member_die'
- + routine into avoiding the generation of the AT_location
- + attributes within the DIE. We do that by temporarily
- + marking the DECL node as "external" and then setting it
- + back to the way it was before. */
- +
- + DECL_EXTERNAL (decl) = 1; /* Fool `output_member_die'. */
- + output_die (output_member_die, decl);
- + DECL_EXTERNAL (decl) = saved_external_flag;
- + }
- + break;
- + }
- +
- /* If we are conforming to the DWARF version 1 specification, don't
- generated any DIEs to represent mere external object declarations. */
-
- ***************
- *** 4095,4108 ****
- up our count of blocks, and that it turn will completely screw up the
- the labels we will reference in subsequent AT_low_pc and AT_high_pc
- attributes (for subsequent blocks). (It's too bad that BLOCK nodes
- ! don't carry their own sequence numbers with them!) */
- !
- ! if (DECL_IGNORED_P (decl))
- ! {
- ! if (TREE_CODE (decl) == FUNCTION_DECL && DECL_INITIAL (decl) != NULL)
- ! abort ();
- ! return;
- ! }
-
- switch (TREE_CODE (decl))
- {
- --- 4225,4238 ----
- up our count of blocks, and that it turn will completely screw up the
- the labels we will reference in subsequent AT_low_pc and AT_high_pc
- attributes (for subsequent blocks). (It's too bad that BLOCK nodes
- ! don't carry their own sequence numbers with them!) Also, don't ignore
- ! TYPE_DECL's which are marked as "ignorable". Those come from the g++
- ! front end and we really must not totally ignore them. */
- !
- ! if (DECL_IGNORED_P (decl)
- ! && TREE_CODE (decl) != FUNCTION_DECL
- ! && TREE_CODE (decl) != TYPE_DECL)
- ! return;
-
- switch (TREE_CODE (decl))
- {
- ***************
- *** 4590,4595 ****
- --- 4720,4729 ----
- register FILE *asm_out_file;
- register char *main_input_filename;
- {
- + /* Adapt to bugs elsewhere. */
- +
- + gplusplus_trees = (strcmp (language_string, "GNU C++") == 0);
- +
- /* Remember the name of the primary input file. */
-
- primary_filename = main_input_filename;
- *** 1.7 1992/06/11 23:40:40
- --- emit-rtl.c 1992/10/09 20:09:29
- ***************
- *** 2171,2176 ****
- --- 2171,2207 ----
- return last;
- }
-
- + /* Emit the insns in a chain starting with FIRST and place them in back of
- + the insn AFTER. Return the last insn emitted. */
- +
- + rtx
- + emit_insns_after (first, after)
- + register rtx first;
- + register rtx after;
- + {
- + register rtx last;
- + register rtx after_after;
- +
- + if (!after)
- + abort ();
- +
- + if (!first)
- + return first;
- +
- + for (last = first; NEXT_INSN (last); last = NEXT_INSN (last))
- + continue;
- +
- + after_after = NEXT_INSN (after);
- +
- + NEXT_INSN (after) = first;
- + PREV_INSN (first) = after;
- + NEXT_INSN (last) = after_after;
- + if (after_after)
- + PREV_INSN (after_after) = last;
- +
- + return last;
- + }
- +
- /* Make an insn of code JUMP_INSN with pattern PATTERN
- and add it to the end of the doubly-linked list. */
-
- *** 1.3 1992/06/11 23:40:40
- --- expr.c 1992/10/09 20:09:32
- ***************
- *** 1696,1701 ****
- --- 1696,1707 ----
-
- argvec = (struct arg *) alloca (nargs * sizeof (struct arg));
-
- + /* how would you do this RIGHT ?? fake a DECL node? dunno... */
- + #ifdef ENCODE_SECTION_INFO
- + /* mark it as a function (to be in the text section that is) */
- + SYMBOL_REF_FLAG (fun) = 1;
- + #endif
- +
- INIT_CUMULATIVE_ARGS (args_so_far, (tree)0, fun);
-
- args_size.constant = 0;
- *** 1.4 1992/08/14 15:10:24
- --- fold-const.c 1992/10/09 20:09:38
- ***************
- *** 48,58 ****
- /* Handle floating overflow for `const_binop'. */
- static jmp_buf float_error;
-
- ! void lshift_double ();
- void rshift_double ();
- void lrotate_double ();
- void rrotate_double ();
- static tree const_binop ();
-
- /* To do constant folding on INTEGER_CST nodes requires 64-bit arithmetic.
- We do that by representing the 64-bit integer as 8 shorts,
- --- 48,66 ----
- /* Handle floating overflow for `const_binop'. */
- static jmp_buf float_error;
-
- ! int lshift_double ();
- void rshift_double ();
- void lrotate_double ();
- void rrotate_double ();
- static tree const_binop ();
- +
- + /* Yield nonzero if a signed left shift of A by B bits overflows.
- + A is a C int; B is nonnegative. */
- + #define left_shift_overflows(a, b) ((a) ^ ((a) << (b)) >> (b))
- +
- + /* Yield nonzero if adding two numbers with A's and B's signs can yield a
- + number with SUM's sign, where A, B, and SUM are all C ints. */
- + #define possible_sum_sign(a, b, sum) ((((a) ^ (b)) | ~ ((a) ^ (sum))) < 0)
-
- /* To do constant folding on INTEGER_CST nodes requires 64-bit arithmetic.
- We do that by representing the 64-bit integer as 8 shorts,
- ***************
- *** 96,107 ****
-
- /* Make the integer constant T valid for its type
- by setting to 0 or 1 all the bits in the constant
- ! that don't belong in the type. */
-
- static void
- ! force_fit_type (t)
- tree t;
- {
- register int prec = TYPE_PRECISION (TREE_TYPE (t));
-
- if (TREE_CODE (TREE_TYPE (t)) == POINTER_TYPE)
- --- 104,120 ----
-
- /* Make the integer constant T valid for its type
- by setting to 0 or 1 all the bits in the constant
- ! that don't belong in the type.
- ! Mark the constant if it has overflowed.
- ! If OVERFLOW is nonzero and the result is signed,
- ! the calculation has already overflowed. */
-
- static void
- ! force_fit_type (t, overflow)
- tree t;
- + int overflow;
- {
- + int low = TREE_INT_CST_LOW (t), high = TREE_INT_CST_HIGH (t);
- register int prec = TYPE_PRECISION (TREE_TYPE (t));
-
- if (TREE_CODE (TREE_TYPE (t)) == POINTER_TYPE)
- ***************
- *** 147,161 ****
- |= ((-1) << prec);
- }
- }
- }
-
- /* Add two 64-bit integers with 64-bit result.
- Each argument is given as two `int' pieces.
- One argument is L1 and H1; the other, L2 and H2.
- The value is stored as two `int' pieces in *LV and *HV.
- We use the 8-shorts representation internally. */
-
- ! void
- add_double (l1, h1, l2, h2, lv, hv)
- int l1, h1, l2, h2;
- int *lv, *hv;
- --- 160,181 ----
- |= ((-1) << prec);
- }
- }
- +
- + /* In C, by definition, unsigned arithmetic does not overflow.
- + But sometimes we want to warn about unsigned truncation. */
- + if ((low ^ TREE_INT_CST_LOW (t)) | (high ^ TREE_INT_CST_HIGH (t))
- + || overflow && ! TREE_UNSIGNED (TREE_TYPE (t)))
- + TREE_CONSTANT_OVERFLOW (t) = 1;
- }
-
- /* Add two 64-bit integers with 64-bit result.
- + Yield nonzero if the (signed) operation overflows.
- Each argument is given as two `int' pieces.
- One argument is L1 and H1; the other, L2 and H2.
- The value is stored as two `int' pieces in *LV and *HV.
- We use the 8-shorts representation internally. */
-
- ! int
- add_double (l1, h1, l2, h2, lv, hv)
- int l1, h1, l2, h2;
- int *lv, *hv;
- ***************
- *** 176,189 ****
- }
-
- decode (arg1, lv, hv);
- }
-
- /* Negate a 64-bit integers with 64-bit result.
- The argument is given as two `int' pieces in L1 and H1.
- The value is stored as two `int' pieces in *LV and *HV.
- We use the 8-shorts representation internally. */
-
- ! void
- neg_double (l1, h1, lv, hv)
- int l1, h1;
- int *lv, *hv;
- --- 196,211 ----
- }
-
- decode (arg1, lv, hv);
- + return !possible_sum_sign (h1, h2, *hv);
- }
-
- /* Negate a 64-bit integers with 64-bit result.
- + Yield nonzero if the (signed) operation overflows.
- The argument is given as two `int' pieces in L1 and H1.
- The value is stored as two `int' pieces in *LV and *HV.
- We use the 8-shorts representation internally. */
-
- ! int
- neg_double (l1, h1, lv, hv)
- int l1, h1;
- int *lv, *hv;
- ***************
- *** 198,212 ****
- *lv = - l1;
- *hv = ~ h1;
- }
- }
-
- /* Multiply two 64-bit integers with 64-bit result.
- Each argument is given as two `int' pieces.
- One argument is L1 and H1; the other, L2 and H2.
- The value is stored as two `int' pieces in *LV and *HV.
- We use the 8-shorts representation internally. */
-
- ! void
- mul_double (l1, h1, l2, h2, lv, hv)
- int l1, h1, l2, h2;
- int *lv, *hv;
- --- 220,236 ----
- *lv = - l1;
- *hv = ~ h1;
- }
- + return (h1 & *hv) < 0;
- }
-
- /* Multiply two 64-bit integers with 64-bit result.
- + Yield nonzero if the (signed) operation overflows.
- Each argument is given as two `int' pieces.
- One argument is L1 and H1; the other, L2 and H2.
- The value is stored as two `int' pieces in *LV and *HV.
- We use the 8-shorts representation internally. */
-
- ! int
- mul_double (l1, h1, l2, h2, lv, hv)
- int l1, h1, l2, h2;
- int *lv, *hv;
- ***************
- *** 216,248 ****
- short prod[16];
- register int carry = 0;
- register int i, j, k;
-
- ! /* These two cases are used extensively, arising from pointer
- ! combinations. */
- if (h2 == 0)
- {
- if (l2 == 2)
- {
- unsigned temp = l1 + l1;
- ! *hv = h1 * 2 + (temp < l1);
- *lv = temp;
- ! return;
- }
- if (l2 == 4)
- {
- unsigned temp = l1 + l1;
- ! h1 = h1 * 4 + ((temp < l1) << 1);
- l1 = temp;
- temp += temp;
- h1 += (temp < l1);
- *lv = temp;
- *hv = h1;
- ! return;
- }
- if (l2 == 8)
- {
- unsigned temp = l1 + l1;
- ! h1 = h1 * 8 + ((temp < l1) << 2);
- l1 = temp;
- temp += temp;
- h1 += (temp < l1) << 1;
- --- 240,275 ----
- short prod[16];
- register int carry = 0;
- register int i, j, k;
- + int toplow, tophigh, neglow, neghigh;
-
- ! /* These cases are used extensively, arising from pointer combinations. */
- if (h2 == 0)
- {
- if (l2 == 2)
- {
- + int overflow = left_shift_overflows (h1, 1);
- unsigned temp = l1 + l1;
- ! *hv = (h1 << 1) + (temp < l1);
- *lv = temp;
- ! return overflow;
- }
- if (l2 == 4)
- {
- + int overflow = left_shift_overflows (h1, 2);
- unsigned temp = l1 + l1;
- ! h1 = (h1 << 2) + ((temp < l1) << 1);
- l1 = temp;
- temp += temp;
- h1 += (temp < l1);
- *lv = temp;
- *hv = h1;
- ! return overflow;
- }
- if (l2 == 8)
- {
- + int overflow = left_shift_overflows (h1, 3);
- unsigned temp = l1 + l1;
- ! h1 = (h1 << 3) + ((temp < l1) << 2);
- l1 = temp;
- temp += temp;
- h1 += (temp < l1) << 1;
- ***************
- *** 251,257 ****
- h1 += (temp < l1);
- *lv = temp;
- *hv = h1;
- ! return;
- }
- }
-
- --- 278,284 ----
- h1 += (temp < l1);
- *lv = temp;
- *hv = h1;
- ! return overflow;
- }
- }
-
- ***************
- *** 275,280 ****
- --- 302,322 ----
- }
-
- decode (prod, lv, hv); /* @@decode ignores prod[8] -> prod[15] */
- +
- + /* Check for overflow by calculating the top half of the answer in full;
- + it should agree with the low half's sign bit. */
- + decode (prod+8, &toplow, &tophigh);
- + if (h1 < 0)
- + {
- + neg_double (l2, h2, &neglow, &neghigh);
- + add_double (neglow, neghigh, toplow, tophigh, &toplow, &tophigh);
- + }
- + if (h2 < 0)
- + {
- + neg_double (l1, h1, &neglow, &neghigh);
- + add_double (neglow, neghigh, toplow, tophigh, &toplow, &tophigh);
- + }
- + return *hv < 0 ? ~(toplow & tophigh) : (toplow | tophigh);
- }
-
- /* Shift the 64-bit integer in L1, H1 left by COUNT places
- ***************
- *** 281,289 ****
- keeping only PREC bits of result.
- Shift right if COUNT is negative.
- ARITH nonzero specifies arithmetic shifting; otherwise use logical shift.
- Store the value as two `int' pieces in *LV and *HV. */
-
- ! void
- lshift_double (l1, h1, count, prec, lv, hv, arith)
- int l1, h1, count, prec;
- int *lv, *hv;
- --- 323,332 ----
- keeping only PREC bits of result.
- Shift right if COUNT is negative.
- ARITH nonzero specifies arithmetic shifting; otherwise use logical shift.
- + Yield nonzero if the arithmetic shift overflows.
- Store the value as two `int' pieces in *LV and *HV. */
-
- ! int
- lshift_double (l1, h1, count, prec, lv, hv, arith)
- int l1, h1, count, prec;
- int *lv, *hv;
- ***************
- *** 291,302 ****
- {
- short arg1[8];
- register int i;
- ! register int carry;
-
- if (count < 0)
- {
- rshift_double (l1, h1, - count, prec, lv, hv, arith);
- ! return;
- }
-
- encode (arg1, l1, h1);
- --- 334,345 ----
- {
- short arg1[8];
- register int i;
- ! register int carry, overflow;
-
- if (count < 0)
- {
- rshift_double (l1, h1, - count, prec, lv, hv, arith);
- ! return 0;
- }
-
- encode (arg1, l1, h1);
- ***************
- *** 304,309 ****
- --- 347,353 ----
- if (count > prec)
- count = prec;
-
- + overflow = 0;
- while (count > 0)
- {
- carry = 0;
- ***************
- *** 314,326 ****
- carry >>= 8;
- }
- count--;
- }
-
- decode (arg1, lv, hv);
- }
-
- /* Shift the 64-bit integer in L1, H1 right by COUNT places
- ! keeping only PREC bits of result. COUNT must be positive.
- ARITH nonzero specifies arithmetic shifting; otherwise use logical shift.
- Store the value as two `int' pieces in *LV and *HV. */
-
- --- 358,372 ----
- carry >>= 8;
- }
- count--;
- + overflow |= carry ^ (arg1[7] >> 7);
- }
-
- decode (arg1, lv, hv);
- + return overflow;
- }
-
- /* Shift the 64-bit integer in L1, H1 right by COUNT places
- ! keeping only PREC bits of result. COUNT must be nonnegative.
- ARITH nonzero specifies arithmetic shifting; otherwise use logical shift.
- Store the value as two `int' pieces in *LV and *HV. */
-
- ***************
- *** 433,441 ****
- TRUNC_DIV_EXPR, FLOOR_DIV_EXPR, CEIL_DIV_EXPR, ROUND_DIV_EXPR
- or EXACT_DIV_EXPR
- It controls how the quotient is rounded to a integer.
- UNS nonzero says do unsigned division. */
-
- ! static void
- div_and_round_double (code, uns,
- lnum_orig, hnum_orig, lden_orig, hden_orig,
- lquo, hquo, lrem, hrem)
- --- 479,488 ----
- TRUNC_DIV_EXPR, FLOOR_DIV_EXPR, CEIL_DIV_EXPR, ROUND_DIV_EXPR
- or EXACT_DIV_EXPR
- It controls how the quotient is rounded to a integer.
- + Yield nonzero if the operation overflows.
- UNS nonzero says do unsigned division. */
-
- ! static int
- div_and_round_double (code, uns,
- lnum_orig, hnum_orig, lden_orig, hden_orig,
- lquo, hquo, lrem, hrem)
- ***************
- *** 453,458 ****
- --- 500,506 ----
- int hnum = hnum_orig;
- unsigned int lden = lden_orig;
- int hden = hden_orig;
- + int overflow = 0;
-
- if ((hden == 0) && (lden == 0))
- abort ();
- ***************
- *** 460,474 ****
- /* calculate quotient sign and convert operands to unsigned. */
- if (!uns)
- {
- ! if (hden < 0)
- {
- quo_neg = ~ quo_neg;
- ! neg_double (lden, hden, &lden, &hden);
- }
- ! if (hnum < 0)
- {
- quo_neg = ~ quo_neg;
- ! neg_double (lnum, hnum, &lnum, &hnum);
- }
- }
-
- --- 508,524 ----
- /* calculate quotient sign and convert operands to unsigned. */
- if (!uns)
- {
- ! if (hnum < 0)
- {
- quo_neg = ~ quo_neg;
- ! /* (minimum integer) / (-1) is the only overflow case. */
- ! if (neg_double (lnum, hnum, &lnum, &hnum))
- ! overflow = ~(hden & lden);
- }
- ! if (hden < 0)
- {
- quo_neg = ~ quo_neg;
- ! neg_double (lden, hden, &lden, &hden);
- }
- }
-
- ***************
- *** 641,647 ****
- case TRUNC_DIV_EXPR:
- case TRUNC_MOD_EXPR: /* round toward zero */
- case EXACT_DIV_EXPR: /* for this one, it shouldn't matter */
- ! return;
-
- case FLOOR_DIV_EXPR:
- case FLOOR_MOD_EXPR: /* round toward negative infinity */
- --- 691,697 ----
- case TRUNC_DIV_EXPR:
- case TRUNC_MOD_EXPR: /* round toward zero */
- case EXACT_DIV_EXPR: /* for this one, it shouldn't matter */
- ! return overflow;
-
- case FLOOR_DIV_EXPR:
- case FLOOR_MOD_EXPR: /* round toward negative infinity */
- ***************
- *** 650,656 ****
- /* quo = quo - 1; */
- add_double (*lquo, *hquo, -1, -1, lquo, hquo);
- }
- ! else return;
- break;
-
- case CEIL_DIV_EXPR:
- --- 700,706 ----
- /* quo = quo - 1; */
- add_double (*lquo, *hquo, -1, -1, lquo, hquo);
- }
- ! else return overflow;
- break;
-
- case CEIL_DIV_EXPR:
- ***************
- *** 659,665 ****
- {
- add_double (*lquo, *hquo, 1, 0, lquo, hquo);
- }
- ! else return;
- break;
-
- case ROUND_DIV_EXPR:
- --- 709,715 ----
- {
- add_double (*lquo, *hquo, 1, 0, lquo, hquo);
- }
- ! else return overflow;
- break;
-
- case ROUND_DIV_EXPR:
- ***************
- *** 685,691 ****
- /* quo = quo + 1; */
- add_double (*lquo, *hquo, 1, 0, lquo, hquo);
- }
- ! else return;
- }
- break;
-
- --- 735,741 ----
- /* quo = quo + 1; */
- add_double (*lquo, *hquo, 1, 0, lquo, hquo);
- }
- ! else return overflow;
- }
- break;
-
- ***************
- *** 697,702 ****
- --- 747,753 ----
- mul_double (*lquo, *hquo, lden_orig, hden_orig, lrem, hrem);
- neg_double (*lrem, *hrem, lrem, hrem);
- add_double (lnum_orig, hnum_orig, *lrem, *hrem, lrem, hrem);
- + return overflow;
- }
-
- #if TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT
- ***************
- *** 956,961 ****
- --- 1007,1013 ----
- int garbagel, garbageh;
- register tree t;
- int uns = TREE_UNSIGNED (TREE_TYPE (arg1));
- + int overflow = 0;
-
- switch (code)
- {
- ***************
- *** 978,987 ****
- case RSHIFT_EXPR:
- int2l = - int2l;
- case LSHIFT_EXPR:
- ! lshift_double (int1l, int1h, int2l,
- ! TYPE_PRECISION (TREE_TYPE (arg1)),
- ! &low, &hi,
- ! !uns);
- t = build_int_2 (low, hi);
- break;
-
- --- 1030,1039 ----
- case RSHIFT_EXPR:
- int2l = - int2l;
- case LSHIFT_EXPR:
- ! overflow = lshift_double (int1l, int1h, int2l,
- ! TYPE_PRECISION (TREE_TYPE (arg1)),
- ! &low, &hi,
- ! !uns);
- t = build_int_2 (low, hi);
- break;
-
- ***************
- *** 999,1005 ****
- {
- int2l += int1l;
- if ((unsigned) int2l < int1l)
- ! int2h += 1;
- t = build_int_2 (int2l, int2h);
- break;
- }
- --- 1051,1057 ----
- {
- int2l += int1l;
- if ((unsigned) int2l < int1l)
- ! overflow = int2h++ >= 0 && int2h < 0;
- t = build_int_2 (int2l, int2h);
- break;
- }
- ***************
- *** 1007,1017 ****
- {
- int1l += int2l;
- if ((unsigned) int1l < int2l)
- ! int1h += 1;
- t = build_int_2 (int1l, int1h);
- break;
- }
- ! add_double (int1l, int1h, int2l, int2h, &low, &hi);
- t = build_int_2 (low, hi);
- break;
-
- --- 1059,1069 ----
- {
- int1l += int2l;
- if ((unsigned) int1l < int2l)
- ! overflow = int1h++ >= 0 && int1h < 0;
- t = build_int_2 (int1l, int1h);
- break;
- }
- ! overflow = add_double (int1l, int1h, int2l, int2h, &low, &hi);
- t = build_int_2 (low, hi);
- break;
-
- ***************
- *** 1021,1028 ****
- t = build_int_2 (int1l, int1h);
- break;
- }
- ! neg_double (int2l, int2h, &int2l, &int2h);
- ! add_double (int1l, int1h, int2l, int2h, &low, &hi);
- t = build_int_2 (low, hi);
- break;
-
- --- 1073,1081 ----
- t = build_int_2 (int1l, int1h);
- break;
- }
- ! neg_double (int2l, int2h, &low, &hi);
- ! add_double (int1l, int1h, low, hi, &low, &hi);
- ! overflow = !possible_sum_sign (hi, int2h, int1h);
- t = build_int_2 (low, hi);
- break;
-
- ***************
- *** 1041,1058 ****
- t = build_int_2 (int2l, int2h);
- goto got_it;
- case 2:
- temp = int2l + int2l;
- ! int2h = int2h * 2 + (temp < int2l);
- t = build_int_2 (temp, int2h);
- goto got_it;
- - case 3:
- - temp = int2l + int2l + int2l;
- - int2h = int2h * 3 + (temp < int2l);
- - t = build_int_2 (temp, int2h);
- - goto got_it;
- case 4:
- temp = int2l + int2l;
- ! int2h = int2h * 4 + ((temp < int2l) << 1);
- int2l = temp;
- temp += temp;
- int2h += (temp < int2l);
- --- 1094,1108 ----
- t = build_int_2 (int2l, int2h);
- goto got_it;
- case 2:
- + overflow = left_shift_overflows (int2h, 1);
- temp = int2l + int2l;
- ! int2h = (int2h << 1) + (temp < int2l);
- t = build_int_2 (temp, int2h);
- goto got_it;
- case 4:
- + overflow = left_shift_overflows (int2h, 2);
- temp = int2l + int2l;
- ! int2h = (int2h << 2) + ((temp < int2l) << 1);
- int2l = temp;
- temp += temp;
- int2h += (temp < int2l);
- ***************
- *** 1059,1066 ****
- t = build_int_2 (temp, int2h);
- goto got_it;
- case 8:
- temp = int2l + int2l;
- ! int2h = int2h * 8 + ((temp < int2l) << 2);
- int2l = temp;
- temp += temp;
- int2h += (temp < int2l) << 1;
- --- 1109,1117 ----
- t = build_int_2 (temp, int2h);
- goto got_it;
- case 8:
- + overflow = left_shift_overflows (int2h, 3);
- temp = int2l + int2l;
- ! int2h = (int2h << 3) + ((temp < int2l) << 2);
- int2l = temp;
- temp += temp;
- int2h += (temp < int2l) << 1;
- ***************
- *** 1088,1094 ****
- }
- }
-
- ! mul_double (int1l, int1h, int2l, int2h, &low, &hi);
- t = build_int_2 (low, hi);
- break;
-
- --- 1139,1145 ----
- }
- }
-
- ! overflow = mul_double (int1l, int1h, int2l, int2h, &low, &hi);
- t = build_int_2 (low, hi);
- break;
-
- ***************
- *** 1119,1133 ****
- t = build_int_2 (1, 0);
- break;
- }
- ! div_and_round_double (code, uns, int1l, int1h, int2l, int2h,
- ! &low, &hi, &garbagel, &garbageh);
- t = build_int_2 (low, hi);
- break;
-
- case TRUNC_MOD_EXPR: case ROUND_MOD_EXPR:
- case FLOOR_MOD_EXPR: case CEIL_MOD_EXPR:
- ! div_and_round_double (code, uns, int1l, int1h, int2l, int2h,
- ! &garbagel, &garbageh, &low, &hi);
- t = build_int_2 (low, hi);
- break;
-
- --- 1170,1186 ----
- t = build_int_2 (1, 0);
- break;
- }
- ! overflow = div_and_round_double (code, uns,
- ! int1l, int1h, int2l, int2h,
- ! &low, &hi, &garbagel, &garbageh);
- t = build_int_2 (low, hi);
- break;
-
- case TRUNC_MOD_EXPR: case ROUND_MOD_EXPR:
- case FLOOR_MOD_EXPR: case CEIL_MOD_EXPR:
- ! overflow = div_and_round_double (code, uns,
- ! int1l, int1h, int2l, int2h,
- ! &garbagel, &garbageh, &low, &hi);
- t = build_int_2 (low, hi);
- break;
-
- ***************
- *** 1156,1162 ****
- }
- got_it:
- TREE_TYPE (t) = TREE_TYPE (arg1);
- ! force_fit_type (t);
- return t;
- }
- #if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
- --- 1209,1215 ----
- }
- got_it:
- TREE_TYPE (t) = TREE_TYPE (arg1);
- ! force_fit_type (t, overflow);
- return t;
- }
- #if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
- ***************
- *** 1171,1177 ****
- d2 = TREE_REAL_CST (arg2);
- if (setjmp (float_error))
- {
- ! warning ("floating overflow in constant folding");
- return build (code, TREE_TYPE (arg1), arg1, arg2);
- }
- set_float_handler (float_error);
- --- 1224,1230 ----
- d2 = TREE_REAL_CST (arg2);
- if (setjmp (float_error))
- {
- ! pedwarn ("floating overflow in constant expression");
- return build (code, TREE_TYPE (arg1), arg1, arg2);
- }
- set_float_handler (float_error);
- ***************
- *** 1363,1369 ****
- t = build_int_2 (TREE_INT_CST_LOW (arg1),
- TREE_INT_CST_HIGH (arg1));
- TREE_TYPE (t) = type;
- ! force_fit_type (t);
- }
- #if !defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
- else if (TREE_CODE (arg1) == REAL_CST)
- --- 1416,1422 ----
- t = build_int_2 (TREE_INT_CST_LOW (arg1),
- TREE_INT_CST_HIGH (arg1));
- TREE_TYPE (t) = type;
- ! force_fit_type (t, 0);
- }
- #if !defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
- else if (TREE_CODE (arg1) == REAL_CST)
- ***************
- *** 1375,1381 ****
- if (! ((REAL_VALUES_LESS (l, x) || REAL_VALUES_EQUAL (l, x))
- && (REAL_VALUES_LESS (x, u) || REAL_VALUES_EQUAL (x, u))))
- {
- ! warning ("real constant out of range for integer conversion");
- return t;
- }
- #ifndef REAL_ARITHMETIC
- --- 1428,1434 ----
- if (! ((REAL_VALUES_LESS (l, x) || REAL_VALUES_EQUAL (l, x))
- && (REAL_VALUES_LESS (x, u) || REAL_VALUES_EQUAL (x, u))))
- {
- ! pedwarn ("real constant out of range for integer conversion");
- return t;
- }
- #ifndef REAL_ARITHMETIC
- ***************
- *** 1403,1409 ****
- }
- #endif
- TREE_TYPE (t) = type;
- ! force_fit_type (t);
- }
- #endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */
- TREE_TYPE (t) = type;
- --- 1456,1462 ----
- }
- #endif
- TREE_TYPE (t) = type;
- ! force_fit_type (t, 0);
- }
- #endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */
- TREE_TYPE (t) = type;
- ***************
- *** 1418,1424 ****
- {
- if (setjmp (float_error))
- {
- ! warning ("floating overflow in constant folding");
- return t;
- }
- set_float_handler (float_error);
- --- 1471,1477 ----
- {
- if (setjmp (float_error))
- {
- ! pedwarn ("floating overflow in constant expression");
- return t;
- }
- set_float_handler (float_error);
- ***************
- *** 2803,2809 ****
- {
- t = build_int_2 (TREE_STRING_POINTER (arg0)[i], 0);
- TREE_TYPE (t) = TREE_TYPE (TREE_TYPE (arg0));
- ! force_fit_type (t);
- }
- }
- return t;
- --- 2856,2862 ----
- {
- t = build_int_2 (TREE_STRING_POINTER (arg0)[i], 0);
- TREE_TYPE (t) = TREE_TYPE (TREE_TYPE (arg0));
- ! force_fit_type (t, 0);
- }
- }
- return t;
- ***************
- *** 2818,2830 ****
- {
- if (TREE_CODE (arg0) == INTEGER_CST)
- {
- ! if (TREE_INT_CST_LOW (arg0) == 0)
- ! t = build_int_2 (0, - TREE_INT_CST_HIGH (arg0));
- ! else
- ! t = build_int_2 (- TREE_INT_CST_LOW (arg0),
- ! ~ TREE_INT_CST_HIGH (arg0));
- TREE_TYPE (t) = type;
- ! force_fit_type (t);
- }
- else if (TREE_CODE (arg0) == REAL_CST)
- t = build_real (type, REAL_VALUE_NEGATE (TREE_REAL_CST (arg0)));
- --- 2871,2883 ----
- {
- if (TREE_CODE (arg0) == INTEGER_CST)
- {
- ! int low, high;
- ! int overflow = neg_double (TREE_INT_CST_LOW (arg0),
- ! TREE_INT_CST_HIGH (arg0),
- ! &low, &high);
- ! t = build_int_2 (low, high);
- TREE_TYPE (t) = type;
- ! force_fit_type (t, overflow);
- }
- else if (TREE_CODE (arg0) == REAL_CST)
- t = build_real (type, REAL_VALUE_NEGATE (TREE_REAL_CST (arg0)));
- ***************
- *** 2874,2880 ****
- t = build_int_2 (~ TREE_INT_CST_LOW (arg0),
- ~ TREE_INT_CST_HIGH (arg0));
- TREE_TYPE (t) = type;
- ! force_fit_type (t);
- }
- else if (TREE_CODE (arg0) == BIT_NOT_EXPR)
- return TREE_OPERAND (arg0, 0);
- --- 2927,2933 ----
- t = build_int_2 (~ TREE_INT_CST_LOW (arg0),
- ~ TREE_INT_CST_HIGH (arg0));
- TREE_TYPE (t) = type;
- ! force_fit_type (t, 0);
- }
- else if (TREE_CODE (arg0) == BIT_NOT_EXPR)
- return TREE_OPERAND (arg0, 0);
- *** 1.3 1992/06/11 23:40:40
- --- function.c 1992/10/09 20:09:38
- ***************
- *** 2396,2401 ****
- --- 2396,2419 ----
- return get_insns ();
- }
-
- + /* Return the first insn which follows the given INSN and which is a
- + NOTE_INSN_BLOCK_BEG, or else just return the given INSN if there is
- + no following NOTE_INSN_BLOCK_BEG. */
- +
- + rtx
- + get_first_following_block_beg (insn)
- + register rtx insn;
- + {
- + register rtx searcher;
- +
- + for (searcher = insn; searcher; searcher = NEXT_INSN (searcher))
- + if (GET_CODE (searcher) == NOTE
- + && NOTE_LINE_NUMBER (searcher) == NOTE_INSN_BLOCK_BEG)
- + return searcher;
- +
- + return insn;
- + }
- +
- /* Return 1 if EXP returns an aggregate value, for which an address
- must be passed to the function or returned by the function. */
-
- *** 1.13 1992/08/14 15:10:24
- --- gcc.c 1992/10/09 20:09:41
- ***************
- *** 429,437 ****
- -undef -D__GNUC__=2 %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
- %{!undef:%{!ansi:%p} %P} %{trigraphs}\
- %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
- - %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
- - %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
- - %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
- %{traditional-cpp:-traditional}\
- %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
- %i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\
- --- 429,434 ----
- ***************
- *** 452,460 ****
- -undef -D__GNUC__=2 %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
- %{!undef:%{!ansi:%p} %P} %{trigraphs}\
- %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
- - %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
- - %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
- - %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
- %{traditional-cpp:-traditional}\
- %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
- %i %W{o*}}\
- --- 449,454 ----
- ***************
- *** 467,475 ****
- -undef -D__OBJC__ -D__GNUC__=2 %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
- %{!undef:%{!ansi:%p} %P} %{trigraphs}\
- %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
- - %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
- - %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
- - %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
- %{traditional-cpp:-traditional}\
- %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
- %i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\
- --- 461,466 ----
- ***************
- *** 493,501 ****
- -undef -D__GNUC__=2 %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
- %{!undef:%{!ansi:%p} %P} %{trigraphs}\
- %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
- - %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
- - %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
- - %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
- %{traditional-cpp:-traditional}\
- %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
- %i %W{o*}"},
- --- 484,489 ----
- ***************
- *** 509,517 ****
- -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus \
- %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
- %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
- - %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
- - %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
- - %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
- %{traditional-cpp:-traditional} %{trigraphs}\
- %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
- %i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\
- --- 497,502 ----
- ***************
- *** 551,556 ****
- --- 536,543 ----
- "%{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a \
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %i %A\n }"},
- {".S", "@assembler-with-cpp"},
- + {".ss", "@assembler-with-cpp"},
- + {".cpp", "@assembler-with-cpp"},
- {"@assembler-with-cpp",
- "cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{D*} %{U*} %{I*} %{i*} %{P} %I\
- %{C:%{!E:%eGNU C does not support -C without using -E}}\
- ***************
- *** 557,565 ****
- %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{trigraphs} \
- -undef -$ %{!undef:%p %P} -D__ASSEMBLER__ \
- %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
- - %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
- - %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
- - %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
- %{traditional-cpp:-traditional}\
- %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
- %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\
- --- 544,549 ----
- *** 1.1 1992/03/23 14:55:41
- --- integrate.h 1992/10/09 20:09:50
- ***************
- *** 70,76 ****
- of each entry in const_equiv_map.
- A value of -1 indicates an entry for a reg which is a parm.
- All other values are "positive". */
- ! #define CONST_AGE_PARM (-1)
- unsigned int const_age;
- /* In parallel with const_equiv_map, record the valid age for each entry.
- The entry is invalid if its age is less than const_age. */
- --- 70,76 ----
- of each entry in const_equiv_map.
- A value of -1 indicates an entry for a reg which is a parm.
- All other values are "positive". */
- ! #define CONST_AGE_PARM ((unsigned) -1)
- unsigned int const_age;
- /* In parallel with const_equiv_map, record the valid age for each entry.
- The entry is invalid if its age is less than const_age. */
- *** 1.2 1992/06/11 23:40:40
- --- print-rtl.c 1992/10/09 20:10:04
- ***************
- *** 232,234 ****
- --- 232,241 ----
- print_rtx (rtx_first);
- }
- }
- +
- + void
- + debug_rtl (rtx_first)
- + rtx rtx_first;
- + {
- + print_rtl (stderr, rtx_first);
- + }
- *** 1.2 1992/06/11 23:40:40
- --- print-tree.c 1992/10/09 20:10:04
- ***************
- *** 193,199 ****
- return;
- }
-
- ! hash = ((int) node & ~(1 << (HOST_BITS_PER_INT - 1))) % HASH_SIZE;
-
- /* If node is in the table, just mention its address. */
- for (b = table[hash]; b; b = b->next)
- --- 193,199 ----
- return;
- }
-
- ! hash = (unsigned) node % HASH_SIZE;
-
- /* If node is in the table, just mention its address. */
- for (b = table[hash]; b; b = b->next)
- *** 1.4 1992/06/11 23:40:40
- --- stmt.c 1992/10/09 20:10:22
- ***************
- *** 56,61 ****
- --- 56,64 ----
-
- extern int xmalloc ();
- extern void free ();
- + extern struct binding_level *current_memorable_context ();
- + extern void push_old_context ();
- + extern void pop_old_context ();
-
- /* Filename and line number of last line-number note,
- whether we actually emitted it or not. */
- ***************
- *** 181,187 ****
- void fixup_gotos ();
- void free_temp_slots ();
- static void expand_cleanups ();
- - static void fixup_cleanups ();
- static void expand_null_return_1 ();
- static int tail_recursion_args ();
- static void do_jump_if_equal ();
- --- 184,189 ----
- ***************
- *** 387,392 ****
- --- 389,401 ----
- /* The LABEL_DECL that this jump is jumping to, or 0
- for break, continue or return. */
- tree target;
- + /* A pointer to a structure (defined elsewhere) which represents the
- + lexical context within which the goto occured. We must restore this
- + context before we actually expand any of the cleanups associated with
- + the goto in order to make the debugging information come out right.
- + Note that this field has to be filled in by a routine provided by the
- + front-end. */
- + struct binding_level *context;
- /* The CODE_LABEL rtx that this is jumping to. */
- rtx target_rtl;
- /* Number of binding contours started in current function
- ***************
- *** 818,823 ****
- --- 827,833 ----
- fixup->before_jump = last_insn ? last_insn : get_last_insn ();
- fixup->target = tree_label;
- fixup->target_rtl = rtl_label;
- + fixup->context = current_memorable_context ();
- fixup->block_start_count = block_start_count;
- fixup->stack_level = 0;
- fixup->cleanup_list_list
- ***************
- *** 878,883 ****
- --- 888,895 ----
- If so, we can finalize it. */
- else if (PREV_INSN (f->target_rtl) != 0)
- {
- + register rtx cleanup_insns;
- +
- /* Get the first non-label after the label
- this goto jumps to. If that's before this scope begins,
- we don't have a jump into the scope. */
- ***************
- *** 906,912 ****
- TREE_REGDECL (f->target) = 1;
- }
-
- ! /* Execute cleanups for blocks this jump exits. */
- if (f->cleanup_list_list)
- {
- tree lists;
- --- 918,943 ----
- TREE_REGDECL (f->target) = 1;
- }
-
- ! /* Setup the same lexical context as was in effect at the point of
- ! the `goto', `continue', `break', or `return' itself. We need
- ! to do this in order to handle the possibility that the cleanups
- ! we are about to generate (for this jump) involve some inline
- ! expansions of functions (as can occur when the cleanups are
- ! calls to C++ object destructors which were declared `inline').
- ! In such cases, we want the nesting of any BLOCK nodes generated
- ! for the inlinings to be "correct" so that the *out.c files (i.e.
- ! the debug info production files) will generate the right info
- ! later on. */
- !
- ! push_old_context (f->context);
- !
- ! /* We will expand the cleanups into a sequence of their own and
- ! then later on we will attach this new sequence to the insn
- ! stream just ahead of the actual jump insn. */
- !
- ! start_sequence ();
- !
- ! /* Expand the cleanups for blocks this jump exits. */
- if (f->cleanup_list_list)
- {
- tree lists;
- ***************
- *** 915,921 ****
- Do their cleanups. */
- if (TREE_ADDRESSABLE (lists)
- && TREE_VALUE (lists) != 0)
- ! fixup_cleanups (TREE_VALUE (lists), &f->before_jump);
- }
-
- /* Restore stack level for the biggest contour that this
- --- 946,957 ----
- Do their cleanups. */
- if (TREE_ADDRESSABLE (lists)
- && TREE_VALUE (lists) != 0)
- ! {
- ! expand_cleanups (TREE_VALUE (lists), 0);
- ! /* Pop any pushes done in the cleanups,
- ! in case function is about to return. */
- ! do_pending_stack_adjust ();
- ! }
- }
-
- /* Restore stack level for the biggest contour that this
- ***************
- *** 922,927 ****
- --- 958,986 ----
- jump jumps out of. */
- if (f->stack_level)
- emit_stack_restore (SAVE_BLOCK, f->stack_level, f->before_jump);
- +
- + /* Finish up the sequence containing the insns which implement the
- + necessary cleanups, and then attach that whole sequence to the
- + insn stream just ahead of the actual jump insn. Attaching it
- + at that point insures that any cleanups which are in fact
- + implicit C++ object destructions (which must be executed upon
- + leaving the block) appear (to the debugger) to be taking place
- + in an area of the generated code where the object(s) being
- + destructed are still "in scope". */
- +
- + cleanup_insns = get_insns ();
- + end_sequence ();
- + emit_insns_after (cleanup_insns, f->before_jump);
- +
- + /* Now, in case any new lexical blocks were added as a result of
- + expanding the cleanups (e.g. if one of more of them involved
- + a function inlining) get the new blocks attached in the right
- + place to the TREE for this function (so that we later generate
- + proper debug info for it) and then pop off the temporary lexical
- + context that we pushed above. */
- +
- + pop_old_context ();
- +
- f->before_jump = 0;
- }
- }
- ***************
- *** 2467,2480 ****
- if (! TREE_USED (decl) && TREE_CODE (decl) == VAR_DECL)
- warning_with_decl (decl, "unused variable `%s'");
-
- - /* Mark the beginning and end of the scope if requested. */
- -
- - if (mark_ends)
- - emit_note (0, NOTE_INSN_BLOCK_END);
- - else
- - /* Get rid of the beginning-mark if we don't make an end-mark. */
- - NOTE_LINE_NUMBER (thisblock->data.block.first_insn) = NOTE_INSN_DELETED;
- -
- if (thisblock->exit_label)
- {
- do_pending_stack_adjust ();
- --- 2526,2531 ----
- ***************
- *** 2636,2641 ****
- --- 2687,2700 ----
- dont_jump_in);
- }
-
- + /* Mark the beginning and end of the scope if requested. */
- +
- + if (mark_ends)
- + emit_note (0, NOTE_INSN_BLOCK_END);
- + else
- + /* Get rid of the beginning-mark if we don't make an end-mark. */
- + NOTE_LINE_NUMBER (thisblock->data.block.first_insn) = NOTE_INSN_DELETED;
- +
- /* If doing stupid register allocation, make sure lives of all
- register variables declared here extend thru end of scope. */
-
- ***************
- *** 2992,3024 ****
- free_temp_slots ();
- }
- }
- - }
- -
- - /* Expand a list of cleanups for a goto fixup.
- - The expansion is put into the insn chain after the insn *BEFORE_JUMP
- - and *BEFORE_JUMP is set to the insn that now comes before the jump. */
- -
- - static void
- - fixup_cleanups (list, before_jump)
- - tree list;
- - rtx *before_jump;
- - {
- - rtx beyond_jump = get_last_insn ();
- - rtx new_before_jump;
- -
- - expand_cleanups (list, 0);
- - /* Pop any pushes done in the cleanups,
- - in case function is about to return. */
- - do_pending_stack_adjust ();
- -
- - new_before_jump = get_last_insn ();
- -
- - if (beyond_jump != new_before_jump)
- - {
- - /* If cleanups expand to nothing, don't reorder. */
- - reorder_insns (NEXT_INSN (beyond_jump), new_before_jump, *before_jump);
- - *before_jump = new_before_jump;
- - }
- }
-
- /* Move all cleanups from the current block_stack
- --- 3051,3056 ----
- *** 1.9 1992/06/12 05:28:49
- --- toplev.c 1992/10/09 20:10:29
- ***************
- *** 70,79 ****
- /* -1 means malloc from own heap and keep all of memory */
- #endif /* atarist */
-
- - #if (defined(atarist) || defined(atariminix))
- - #include "astab.h" /* need this for ASM_OUTPUT_SOURCE_FILENAME */
- - #endif
- -
- #ifdef VMS
- /* The extra parameters substantially improve the I/O performance. */
- static FILE *
- --- 70,75 ----
- ***************
- *** 1309,1314 ****
- --- 1305,1311 ----
- name[len - 4] = 0;
- }
-
- + #ifdef SYSV
- /* Output a file name in the form wanted by System V. */
-
- void
- ***************
- *** 1337,1342 ****
- --- 1334,1340 ----
- #endif
- #endif
- }
- + #endif
-
- /* Compile an entire file of output from cpp, named NAME.
- Write a file of assembly output and various debugging dumps. */
- ***************
- *** 2028,2033 ****
- --- 2026,2035 ----
- #ifdef SDB_DEBUGGING_INFO
- if (write_symbols == SDB_DEBUG)
- TIMEVAR (symout_time, sdbout_symbol (TYPE_STUB_DECL (type), !toplev));
- + #endif
- + #ifdef DWARF_DEBUGGING_INFO
- + if (write_symbols == DWARF_DEBUG && toplev)
- + TIMEVAR (symout_time, dwarfout_file_scope_decl (TYPE_STUB_DECL (type), 0));
- #endif
- }
-
- *** 1.3 1992/06/11 23:40:40
- --- tree.h 1992/10/09 20:10:30
- ***************
- *** 218,225 ****
- implicitly and should not lead to an "unused value" warning. */
- #define TREE_NO_UNUSED_WARNING(NODE) ((NODE)->common.static_flag)
-
- ! /* In a NON_LVALUE_EXPR, this means there was overflow in folding.
- ! The folded constant is inside the NON_LVALUE_EXPR. */
- #define TREE_CONSTANT_OVERFLOW(NODE) ((NODE)->common.static_flag)
-
- /* Nonzero for a TREE_LIST or TREE_VEC node means that the derivation
- --- 218,224 ----
- implicitly and should not lead to an "unused value" warning. */
- #define TREE_NO_UNUSED_WARNING(NODE) ((NODE)->common.static_flag)
-
- ! /* In an INTEGER_CST, this means there was overflow in folding. */
- #define TREE_CONSTANT_OVERFLOW(NODE) ((NODE)->common.static_flag)
-
- /* Nonzero for a TREE_LIST or TREE_VEC node means that the derivation
- *** 1.4 1992/06/11 23:40:40
- --- unroll.c 1992/10/09 20:10:31
- ***************
- *** 1661,1667 ****
- int regno = REGNO (SET_DEST (pattern));
-
- if (map->const_age_map[regno] == map->const_age)
- ! map->const_age_map[regno] = -1;
- }
- break;
-
- --- 1661,1667 ----
- int regno = REGNO (SET_DEST (pattern));
-
- if (map->const_age_map[regno] == map->const_age)
- ! map->const_age_map[regno] = CONST_AGE_PARM;
- }
- break;
-
- *** 1.3 1992/06/11 23:40:40
- --- varasm.c 1992/10/09 20:10:33
- ***************
- *** 951,964 ****
- assemble_external_libcall (fun)
- rtx fun;
- {
- - #ifdef ASM_OUTPUT_EXTERNAL_LIBCALL
- /* Declare library function name external when first used, if nec. */
- if (! SYMBOL_REF_USED (fun))
- {
- SYMBOL_REF_USED (fun) = 1;
- ASM_OUTPUT_EXTERNAL_LIBCALL (asm_out_file, fun);
- - }
- #endif
- }
-
- /* Declare the label NAME global. */
- --- 951,964 ----
- assemble_external_libcall (fun)
- rtx fun;
- {
- /* Declare library function name external when first used, if nec. */
- if (! SYMBOL_REF_USED (fun))
- {
- SYMBOL_REF_USED (fun) = 1;
- + #ifdef ASM_OUTPUT_EXTERNAL_LIBCALL
- ASM_OUTPUT_EXTERNAL_LIBCALL (asm_out_file, fun);
- #endif
- + }
- }
-
- /* Declare the label NAME global. */
-